summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-08-06 09:22:00 (EDT)
committerStephan Born2013-09-23 04:58:23 (EDT)
commitb7fb3ca7642ba0c2bbb84f87a0a81917ccbfd2ef (patch)
tree0259184e3b8b325cced4f6adff5b6796feb082c5
parent67aaf083c5a7396545b8edf8209e0ce75e3d3c17 (diff)
downloadorg.eclipse.stardust.ui.web-b7fb3ca7642ba0c2bbb84f87a0a81917ccbfd2ef.zip
org.eclipse.stardust.ui.web-b7fb3ca7642ba0c2bbb84f87a0a81917ccbfd2ef.tar.gz
org.eclipse.stardust.ui.web-b7fb3ca7642ba0c2bbb84f87a0a81917ccbfd2ef.tar.bz2
Jira-ID: CRNT-29929
1)Added code to refresh the launchPanelIframe when PopUp dialog closes from LaunchPanel 2)Added filter to remove Dialog.open() and Dialog.close() eventscripts when one Popup closes and another opens from PortalApplicationSingleViewEventScript.java git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66516 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplicationSingleViewEventScript.java12
-rw-r--r--portal-common/src/main/resources/META-INF/xhtml/js/BridgeUtils.js26
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/launchpad/DepartmentDialogBean.java7
3 files changed, 40 insertions, 5 deletions
diff --git a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplicationSingleViewEventScript.java b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplicationSingleViewEventScript.java
index a59a04f..1c9016a 100644
--- a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplicationSingleViewEventScript.java
+++ b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplicationSingleViewEventScript.java
@@ -134,8 +134,16 @@ public class PortalApplicationSingleViewEventScript implements Serializable
allScripts.append(toStringBuffer(iframeCloseScripts));
allScripts.append(toStringBuffer(openViewScripts));
allScripts.append(toStringBuffer(iframeCreateScripts));
- allScripts.append(toStringBuffer(closeDialogScripts));
- allScripts.append(toStringBuffer(openDialogScripts));
+ if (!closeDialogScripts.isEmpty() && !openDialogScripts.isEmpty())
+ {
+ // Prevent closing and re-creating launchPanel iframe when one dialog closes
+ // and other opens
+ }
+ else
+ {
+ allScripts.append(toStringBuffer(closeDialogScripts));
+ allScripts.append(toStringBuffer(openDialogScripts));
+ }
allScripts.append(toStringBuffer(restOfTheScripts));
allScripts.append(toStringBuffer(closeViewScripts));
allScripts.append(toStringBuffer(endScripts));
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 0fc4132..01a354f 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
@@ -883,7 +883,7 @@ if (!window["BridgeUtils"].Dialog) {
// Sidebar
iframeForSidebar.style.visibility = "hidden";
-
+ var currLaunchPanelIframe = null;
// Sidebar And View
if (launchPanelIframe) {
launchPanelIframe.setAttribute("class", launchPanelIframeOrgData.clazz);
@@ -892,6 +892,9 @@ if (!window["BridgeUtils"].Dialog) {
// Sidebar Title
jQuery(".sidebar-title").get(0).style.display = "";
+ // store the launchPanel iframe for refresh after closing popup
+ currLaunchPanelIframe = launchPanelIframe;
+
} else {
// Show Sidebar
var sidebar = document.getElementById("sidebar");
@@ -901,7 +904,7 @@ if (!window["BridgeUtils"].Dialog) {
if (!sidebarPinned) {
BridgeUtils.View.unpinSidebar();
}
-
+
invokedFromlaunchPanels = undefined;
sidebarPinned = undefined;
launchPanelIframe = undefined;
@@ -909,8 +912,25 @@ if (!window["BridgeUtils"].Dialog) {
popupDialogDiv.parentNode.removeChild(popupDialogDiv);
popupDialogDiv = undefined;
-
+
BridgeUtils.FrameManager.resizeAndRepositionAllActive();
+ // TODO - Review if this is the ideal approach when multiple
+ // Popups open from launchPanel in sequence
+ if(currLaunchPanelIframe){
+ // When new popup opens on action of existing popup from
+ // LaunchPanel, portalSingleViewLaunchPanelsOnly.iface needs
+ // to be reloaded
+ var launchSrc=currLaunchPanelIframe.getAttribute("src");
+ currLaunchPanelIframe.setAttribute("src",'about:blank');
+ window.setTimeout(function(){
+ if(launchSrc.indexOf('?') > 0){
+ launchSrc = launchSrc.substr(0,launchSrc.indexOf('?'));
+ }
+
+ launchSrc += '?random=' + Math.floor(Math.random() * 100000) + 1;
+ currLaunchPanelIframe.setAttribute("src",launchSrc);
+ },200);
+ }
}
}
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/launchpad/DepartmentDialogBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/launchpad/DepartmentDialogBean.java
index 1594e23..fba3fe1 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/launchpad/DepartmentDialogBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/launchpad/DepartmentDialogBean.java
@@ -34,6 +34,13 @@ public class DepartmentDialogBean extends PopupUIComponentBean
fromlaunchPanels = true;
}
+ @Override
+ public void openPopup()
+ {
+ fromlaunchPanels = true;
+ super.openPopup();
+ }
+
public static DepartmentDialogBean getCurrent()
{
return (DepartmentDialogBean) FacesUtils.getBeanFromContext(BEAN_NAME);