Author: trong.tran
Date: 2010-04-12 07:27:48 -0400 (Mon, 12 Apr 2010)
New Revision: 2588
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
GTNPORTAL-1058 Lose the tab container while dragging out its last tab
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-12
11:21:18 UTC (rev 2587)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-12
11:27:48 UTC (rev 2588)
@@ -150,7 +150,15 @@
*/
if (uiParent.getChildren().size() == 1)
{
- uiComponentTobeRemoved = uiParent.getParent();
+ UIContainer uiTabParent = uiParent.getParent();
+ if(uiTabParent.getChildren().size() > 1)
+ {
+ uiComponentTobeRemoved = uiParent;
+ }
+ else
+ {
+ uiComponentTobeRemoved = uiTabParent;
+ }
}
else
{
@@ -361,7 +369,15 @@
{
if (uiParent.getChildren().size() == 1)
{
- removeUIComponent(uiParent.getParent(), pcontext, false);
+ UIContainer uiTabParent = uiParent.getParent();
+ if (uiTabParent.getChildren().size() > 1)
+ {
+ removeUIComponent(uiParent, pcontext, false);
+ }
+ else
+ {
+ removeUIComponent(uiTabParent, pcontext, false);
+ }
}
else
{
Show replies by date