summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-08-16 07:23:50 (EDT)
committer Stephan Born2013-09-23 05:01:19 (EDT)
commitd21a94eab18ef6a8fe640a220e31ac8b06899b5d (patch)
treeaca73cb45d58fcf3b90e51b5a91a671357a14cca
parentcde42e5464cd4e3f99c00001dd9a1b06abf98422 (diff)
downloadorg.eclipse.stardust.ui.web-d21a94eab18ef6a8fe640a220e31ac8b06899b5d.zip
org.eclipse.stardust.ui.web-d21a94eab18ef6a8fe640a220e31ac8b06899b5d.tar.gz
org.eclipse.stardust.ui.web-d21a94eab18ef6a8fe640a220e31ac8b06899b5d.tar.bz2
Jira-ID: CRNT-29841
Changed the iframe.style.position='fixed' for tiff Iframe. Adjusted the code in BridgeUtils.handleViewScroll() to prevent Y movement when position in fixed git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66751 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js26
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js15
2 files changed, 23 insertions, 18 deletions
diff --git a/portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js b/portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js
index e8ceba7..70f27dc 100644
--- a/portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js
+++ b/portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js
@@ -1193,7 +1193,7 @@ if (!window["BridgeUtils"].FrameManager) {
var newX = iFrame.posX - scrollPos.x;
var newY = iFrame.posY - scrollPos.y;
- // Hide the content frame, so that the right scroll position can be retrieved
+ // Hide the content frame, so that the right scroll position can be retrieved
contentFrame.style.display = "none";
var scrollWidth = document.body.scrollWidth;
@@ -1205,7 +1205,7 @@ if (!window["BridgeUtils"].FrameManager) {
if (right > scrollWidth){
newX -= (right - scrollWidth) + 25; // Buffer for scrollbar
}
- if (bottom > scrollHeight){
+ if (bottom > scrollHeight && contentFrame.style.position != 'fixed') {
newY -= (bottom - scrollHeight) + 25; // Buffer for scrollbar
}
@@ -1406,6 +1406,7 @@ if (!window["BridgeUtils"].FrameManager) {
if (width != undefined || height != undefined) {
autoResize = false;
}
+ var positionType = advanceArgs.positionType;
} else {
// Read From Frame Attributes
anchorId = getFrameAttribute(contentFrame, 'anchorId');
@@ -1418,7 +1419,7 @@ if (!window["BridgeUtils"].FrameManager) {
widthAdjustment = getFrameAttribute(contentFrame, 'widthAdjustment', 'Integer');
heightAdjustment = getFrameAttribute(contentFrame, 'heightAdjustment', 'Integer');
}
-
+
// Set Defaults
autoResize = autoResize != undefined ? autoResize : true;
widthAdjustment = widthAdjustment != undefined ? widthAdjustment : 0;
@@ -1426,7 +1427,8 @@ if (!window["BridgeUtils"].FrameManager) {
openOnRight = openOnRight != undefined ? openOnRight : true;
anchorXAdjustment = anchorXAdjustment != undefined ? anchorXAdjustment : 0;
anchorYAdjustment = anchorYAdjustment != undefined ? anchorYAdjustment : 0;
-
+ positionType = positionType == undefined ? getFrameAttribute(contentFrame, 'positionType') : positionType;
+
if (anchorId == undefined) {
anchorId = 'ippActivityPanelAnchor';
autoResize = true;
@@ -1463,13 +1465,17 @@ if (!window["BridgeUtils"].FrameManager) {
posX += anchorXAdjustment;
var posY = pos.y + anchorYAdjustment;
-
- contentFrame.style.position = 'absolute';
+
+ if(positionType){
+ contentFrame.style.position = positionType;
+ }else{
+ contentFrame.style.position = 'absolute';
+ }
contentFrame.style.left = posX + 'px';
contentFrame.style.top = posY + 'px';
contentFrame.style.width = iFrameWith + 'px';
contentFrame.style.height = iFrameHeight + 'px';
-
+
if (border != undefined) {
contentFrame.style.border = border;
}
@@ -1490,17 +1496,17 @@ if (!window["BridgeUtils"].FrameManager) {
contentFrame.setAttribute('autoResize', autoResize);
contentFrame.setAttribute('widthAdjustment', widthAdjustment);
contentFrame.setAttribute('heightAdjustment', heightAdjustment);
-
+ contentFrame.setAttribute('positionType', positionType);
+
// Finally make iFrame visible
contentFrame.style.display = 'inline';
addIframe(contentId, posX, posY);
-
+
// This is needed because if page is scrolled at the time of iFrame activation
// Then it has to be readjusted for scroll position.
handleScroll();
handleViewScroll(viewFrameData.win, contentFrame);
-
BridgeUtils.log("Frame Activated = " + contentId);
}
}
diff --git a/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js b/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
index d2919c5..507070e 100644
--- a/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
+++ b/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
@@ -26,15 +26,13 @@ function restoreTiffIframe(iframeId, anchorId) {
var windowHeight = document.body.clientHeight;
docWidth = parseInt((document.body.clientWidth - leftValue)) - 30;
- docHeight = parseInt(windowHeight)+55;
-
- docHeight -= topValue;
+ docHeight = parseInt(windowHeight);
+
+ docHeight -= (topValue/6);
if (document.getElementById('tiffViewerIframe')) {
- document.getElementById('tiffViewerIframe').style.width = docWidth;
- +'px';
- document.getElementById('tiffViewerIframe').style.height = docHeight;
- +'px';
+ document.getElementById('tiffViewerIframe').style.width = docWidth +'px';
+ document.getElementById('tiffViewerIframe').style.height = docHeight +'px';
window.parent.EventHub.events.publish('CANVAS_RESIZED', docWidth,
docHeight);
@@ -65,7 +63,8 @@ function activateAndResizeIframe(iframeId, defaultPath) {
canvasHeight : docHeight,
width : docWidth,
height : docHeight,
- anchorId : anchorId
+ anchorId : anchorId,
+ positionType : 'fixed'
});
} \ No newline at end of file