gatein SVN: r3027 - portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-05-10 09:16:00 -0400 (Mon, 10 May 2010)
New Revision: 3027
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
Log:
GTNPORTAL-1176 : Provide mop cache operation trace logging
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-05-10 12:58:15 UTC (rev 3026)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-05-10 13:16:00 UTC (rev 3027)
@@ -26,6 +26,8 @@
import org.exoplatform.services.cache.CacheService;
import org.exoplatform.services.cache.ExoCache;
import org.exoplatform.services.jcr.RepositoryService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
import org.gatein.mop.core.api.MOPService;
import org.picocontainer.Startable;
@@ -40,6 +42,9 @@
{
/** . */
+ private final Logger log = LoggerFactory.getLogger(POMSessionManager.class);
+
+ /** . */
private MOPService pomService;
/** . */
@@ -69,17 +74,47 @@
public void cachePut(Serializable key, Object value)
{
- cache.put(GlobalKey.wrap(repositoryService, key), value);
+ GlobalKey globalKey = GlobalKey.wrap(repositoryService, key);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Updating cache key=" + globalKey + " with value=" + value);
+ }
+
+ //
+ cache.put(globalKey, value);
}
public Object cacheGet(Serializable key)
{
- return cache.get(GlobalKey.wrap(repositoryService, key));
+ GlobalKey globalKey = GlobalKey.wrap(repositoryService, key);
+
+ //
+ Object value = cache.get(globalKey);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Obtained for cache key=" + globalKey + " value=" + value);
+ }
+
+ //
+ return value;
}
public void cacheRemove(Serializable key)
{
- cache.remove(GlobalKey.wrap(repositoryService, key));
+ GlobalKey globalKey = GlobalKey.wrap(repositoryService, key);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Removing cache key=" + globalKey);
+ }
+
+ //
+ cache.remove(globalKey);
}
public void start()
@@ -109,6 +144,12 @@
public void clearCache()
{
+ if (log.isTraceEnabled())
+ {
+ log.trace("Clearing cache");
+ }
+
+ //
cache.clearCache();
}
14 years, 8 months
gatein SVN: r3026 - in portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src: suite/org/exoplatform/portal/selenium and 1 other directory.
by do-not-reply@jboss.org
Author: mvanco(a)redhat.com
Date: 2010-05-10 08:58:15 -0400 (Mon, 10 May 2010)
New Revision: 3026
Modified:
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_004_CreateNewPortalWithNameStartNumber.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_008_CreateNewPortalWithNameIsTheSameWithExistingOne.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_009_CreateNewPortalWithPortalNameTheSameWithExistingButDifferentByLowerAndUpperCase.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_10_002_DeleteCurrentPortalByLegalUser.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_026_CreateSameNamePortalPagesInDifferentPortals.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html
portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_VerifyViewRightsPortlet.html
Log:
EPP5 UI tests: added new function clickOnElement - use when clicking on checkboxes (publicMode) - simply click causes failures at IEs
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-05-10 12:58:15 UTC (rev 3026)
@@ -90,14 +90,14 @@
sb.append("public String speed = \"100\";\n");
sb.append("public String timeout = \"30000\";\n");
sb.append("public int timeoutSecInt = 30;\n");
- sb.append("public String browser = \"firefox\";\n");
+ sb.append("public String browser = \"firefox\";\n");
sb.append("public String host = \"localhost\";\n");
sb.append("public void setSpeed() {\n selenium.setSpeed(speed);\n}\n\n");
sb.append("public void setUp() throws Exception {\n");
sb.append(" browser = System.getProperty(\"selenium.browser\", browser);\n");
sb.append(" timeout = System.getProperty(\"selenium.timeout\", timeout);\n");
sb.append(" timeoutSecInt = Integer.parseInt(timeout)/1000;\n");
- sb.append(" speed = System.getProperty(\"selenium.speed\", speed);\n");
+ sb.append(" speed = System.getProperty(\"selenium.speed\", speed);\n");
sb.append(" host = System.getProperty(\"selenium.host\", host);\n");
sb.append(" super.setUp(\"http://\" + host + \":8080/portal/\", \"*\" + browser);\n");
sb.append("}\n\n");
@@ -290,7 +290,7 @@
sb.append(param2);
sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
sb.append("Thread.sleep(1000);\n");
- sb.append("}\n");
+ sb.append("}\n");
} else if (param1.equals("waitForTextNotPresent")) {
sb.append("for (int second = 0;; second++) {\n");
sb.append(getTimeoutMessage(param1));
@@ -298,7 +298,7 @@
sb.append(param2);
sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
sb.append("Thread.sleep(1000);\n");
- sb.append("}\n");
+ sb.append("}\n");
} else if (param1.equals("waitForTable")) {
sb.append("for (int second = 0;; second++) {\n");
sb.append(getTimeoutMessage(param1));
@@ -422,6 +422,10 @@
sb.append("if (selenium.isTextPresent(\"" + param2 + "\")) {\n");
} else if (param1.equals("endIfTextPresentCondition")) {
sb.append("}\n");
+ } else if (param1.equals("clickOnElement")) {
+ sb.append("selenium.click(\"");
+ sb.append(param2);
+ sb.append("\");\n");
} else if (param1.length() > 0) {
String message = param1 + " was not translated \"" + param2 + "\"";
System.err.println("[ERROR] " + message);
@@ -524,4 +528,4 @@
private static final String[] _FIX_PARAM_NEW_SUBS = new String[] { "\\n", "\\n" };
public static final String SLASH = "/";
-}
+}
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_002_CreateNewPortalWithValidValue.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -137,7 +137,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -152,13 +152,13 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
<tr>
<td>echo</td>
- <td>--Choose Edit Permission Setting--</td>
+ <td>--Choose Edit Permission Setting--</td>p
<td></td>
</tr>
<tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_004_CreateNewPortalWithNameStartNumber.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_004_CreateNewPortalWithNameStartNumber.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_004_CreateNewPortalWithNameStartNumber.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -147,7 +147,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_008_CreateNewPortalWithNameIsTheSameWithExistingOne.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_008_CreateNewPortalWithNameIsTheSameWithExistingOne.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_008_CreateNewPortalWithNameIsTheSameWithExistingOne.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
@@ -322,7 +322,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_009_CreateNewPortalWithPortalNameTheSameWithExistingButDifferentByLowerAndUpperCase.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_009_CreateNewPortalWithPortalNameTheSameWithExistingButDifferentByLowerAndUpperCase.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_009_CreateNewPortalWithPortalNameTheSameWithExistingButDifferentByLowerAndUpperCase.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
@@ -322,11 +322,16 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>publicMode</td>
<td></td>
</tr>
<tr>
+ <td>clickOnElement</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Choose Edit Permission Setting--</td>
<td></td>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_10_002_DeleteCurrentPortalByLegalUser.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_10_002_DeleteCurrentPortalByLegalUser.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_10_002_DeleteCurrentPortalByLegalUser.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_026_CreateSameNamePortalPagesInDifferentPortals.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_026_CreateSameNamePortalPagesInDifferentPortals.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_20_026_CreateSameNamePortalPagesInDifferentPortals.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -252,7 +252,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -102,7 +102,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -112,7 +112,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -102,7 +102,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -113,12 +113,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>link=Users</td>
+ <td>link=Administrators</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>link=Users</td>
+ <td>link=Administrators</td>
<td></td>
</tr>
<tr>
@@ -217,6 +217,21 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Portal Setting</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>xpath=//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']</td>
<td>1,1</td>
Modified: portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_VerifyViewRightsPortlet.html
===================================================================
--- portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_VerifyViewRightsPortlet.html 2010-05-10 12:30:58 UTC (rev 3025)
+++ portal/branches/EPP_5_0_Branch/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_VerifyViewRightsPortlet.html 2010-05-10 12:58:15 UTC (rev 3026)
@@ -147,7 +147,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickOnElement</td>
<td>publicMode</td>
<td></td>
</tr>
14 years, 8 months
gatein SVN: r3025 - in portal/trunk/web: portal/src/main/webapp/groovy/portal/webui/portal and 1 other directory.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 08:30:58 -0400 (Mon, 10 May 2010)
New Revision: 3025
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
Log:
GTNPORTAL-1175: fix exception when doubleClick on save button of page editor composer while creating a new page -> Disable save button after onClick
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js 2010-05-10 12:04:05 UTC (rev 3024)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/DOMUtil.js 2010-05-10 12:30:58 UTC (rev 3025)
@@ -453,5 +453,9 @@
return el; // some other object, just pass it back
}
+DOMUtil.prototype.disableOnClick = function(el) {
+ el.onClick = new Function("return false;");
+}
+
/****************************************************************************/
eXo.core.DOMUtil = new DOMUtil() ;
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-05-10 12:04:05 UTC (rev 3024)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2010-05-10 12:30:58 UTC (rev 3025)
@@ -16,7 +16,7 @@
<% if(uicomponent.isShowControl) { %>
<a class="CloseButton" title="<%=_ctx.appRes("word.abort")%>" href="<%=uicomponent.event("Abort")%>"><span></span></a>
<% if (uicomponent.isUsedInWizard()) { %>
- <a class="<%= isEditted ? "EdittedSaveButton" : "SaveButton" %>" title="<%=_ctx.appRes("word.finish")%>" href="<%=uicomponent.url("Finish")%>"><span></span></a>
+ <a class="<%= isEditted ? "EdittedSaveButton" : "SaveButton" %>" title="<%=_ctx.appRes("word.finish")%>" href="<%=uicomponent.url("Finish")%>" onclick="eXo.core.DOMUtil.disableOnClick(this);" ><span></span></a>
<a class="BackButton"" title="<%=_ctx.appRes("word.back")%>" href="<%=uicomponent.event("Back")%>">
<span></span>
</a>
14 years, 8 months
gatein SVN: r3024 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-05-10 08:04:05 -0400 (Mon, 10 May 2010)
New Revision: 3024
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
GTNPORTAL-1110: Refactor search methods in PageNavigationUtils and UINavigationNodeSelector
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-10 08:22:32 UTC (rev 3023)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-10 12:04:05 UTC (rev 3024)
@@ -65,10 +65,14 @@
*
* 2. The element indexed 0 is its parent
*
+ * @deprecated Returning 2-element array would makes it difficult to understand, handle the code.
+ * Method searchParentChildPairByUri should be used instead.
+ *
* @param node
* @param uri
* @return
*/
+ @Deprecated
public static PageNode[] searchPageNodesByUri(PageNode node, String uri)
{
if (node.getUri().equals(uri))
@@ -89,6 +93,7 @@
return null;
}
+ @Deprecated
public static PageNode[] searchPageNodesByUri(PageNavigation nav, String uri)
{
if (nav.getNodes() == null)
@@ -102,7 +107,62 @@
}
return null;
}
-
+
+ /**
+ * This method returns a pair of a node matching the parsed uri and the parent of this node.
+ *
+ * @param nav
+ * @param uri
+ * @return
+ */
+ public static ParentChildPair searchParentChildPairByUri(PageNavigation nav, String uri)
+ {
+ List<PageNode> nodes = nav.getNodes();
+
+ if(nodes == null)
+ {
+ return null;
+ }
+
+ for(PageNode ele : nodes)
+ {
+ ParentChildPair parentChildPair = searchParentChildPairUnderNode(ele, uri);
+ if(parentChildPair != null)
+ {
+ return parentChildPair;
+ }
+ }
+
+ return null;
+ }
+
+ public static ParentChildPair searchParentChildPairUnderNode(PageNode rootNode, String uri)
+ {
+ if(uri.equals(rootNode.getUri()))
+ {
+ return new ParentChildPair(null, rootNode);
+ }
+
+ List<PageNode> nodes = rootNode.getNodes();
+ if(nodes == null)
+ {
+ return null;
+ }
+
+ for(PageNode node : nodes)
+ {
+ ParentChildPair parentChildPair = searchParentChildPairUnderNode(node, uri);
+ if(parentChildPair != null)
+ {
+ parentChildPair.setParentNode(node);
+ return parentChildPair;
+ }
+ }
+
+ return null;
+ }
+
+
public static PageNode searchPageNodeByUri(PageNode node, String uri)
{
if (node.getUri().equals(uri))
@@ -326,4 +386,43 @@
}
return null;
}
+
+ /**
+ *
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * @version $Id$
+ *
+ */
+ public static class ParentChildPair
+ {
+ private PageNode parentNode;
+
+ private PageNode childNode;
+
+ public ParentChildPair(PageNode _parentNode, PageNode _childNode)
+ {
+ this.parentNode = _parentNode;
+ this.childNode = _childNode;
+ }
+
+ public PageNode getParentNode()
+ {
+ return parentNode;
+ }
+
+ public PageNode getChildNode()
+ {
+ return childNode;
+ }
+
+ public void setParentNode(PageNode _parentNode)
+ {
+ this.parentNode = _parentNode;
+ }
+
+ public void setChildNode(PageNode _childNode)
+ {
+ this.childNode = _childNode;
+ }
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-05-10 08:22:32 UTC (rev 3023)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-05-10 12:04:05 UTC (rev 3024)
@@ -26,6 +26,7 @@
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.Visibility;
+import org.exoplatform.portal.webui.navigation.PageNavigationUtils.ParentChildPair;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageNodeForm2;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
@@ -804,31 +805,29 @@
return;
}
- PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
- if (pageNodes == null)
+ ParentChildPair parentChildPair = PageNavigationUtils.searchParentChildPairByUri(nav, uri);
+ if (parentChildPair == null)
{
return;
}
- if (pageNodes[0] == null)
- {
- if(pageNodes[1].isSystem()) {
+ PageNode parentNode = parentChildPair.getParentNode();
+ PageNode childNode = parentChildPair.getChildNode();
+
+ if(childNode.isSystem()) {
uiApp.addMessage(new ApplicationMessage("UINavigationNodeSelector.msg.systemnode-delete", null, ApplicationMessage.ERROR));
return;
}
-
- nav.getNodes().remove(pageNodes[1]);
- return;
+
+ if(parentNode == null)
+ {
+ nav.getNodes().remove(childNode);
}
-
- for (PageNode pageNode : pageNodes) {
- if(pageNode.isSystem()) {
- uiApp.addMessage(new ApplicationMessage("UINavigationNodeSelector.msg.systemnode-delete", null, ApplicationMessage.ERROR));
- return;
- }
+ else
+ {
+ parentNode.getNodes().remove(childNode);
+ uiNodeSelector.selectPageNodeByUri(parentNode.getUri());
}
- pageNodes[0].getChildren().remove(pageNodes[1]);
- uiNodeSelector.selectPageNodeByUri(pageNodes[0].getUri());
}
}
14 years, 8 months
gatein SVN: r3023 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-05-10 04:22:32 -0400 (Mon, 10 May 2010)
New Revision: 3023
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
Log:
Add comment on Java code
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-10 07:11:39 UTC (rev 3022)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-10 08:22:32 UTC (rev 3023)
@@ -57,8 +57,18 @@
}
}
- // Minh Hoang TO
- //TODO: Rewrite this method with a better algorithm by spliting the uri
+ /**
+ * This method returns a pair of PageNode, one is the PageNode specified by the uri,
+ * another is its parent. Value return is 2-element array
+ *
+ * 1. The element indexed 1 is the page node specified by the uri
+ *
+ * 2. The element indexed 0 is its parent
+ *
+ * @param node
+ * @param uri
+ * @return
+ */
public static PageNode[] searchPageNodesByUri(PageNode node, String uri)
{
if (node.getUri().equals(uri))
14 years, 8 months
gatein SVN: r3022 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 03:11:39 -0400 (Mon, 10 May 2010)
New Revision: 3022
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
Log:
GTNPORTAL-1165:Remove useless properties in UIPortletApplication
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-05-10 07:11:09 UTC (rev 3021)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-05-10 07:11:39 UTC (rev 3022)
@@ -67,8 +67,9 @@
return;
}
UIPortletApplication uiApp = (UIPortletApplication)uicomponent;
- context.getWriter().append("<div id=\"").append(uicomponent.getId()).append("\"").append(" style=\"min-width:")
- .append(String.valueOf(uiApp.getMinWidth())).append("px\" class=\"").append(uicomponent.getId()).append("\">");
+
+ context.getWriter().append("<div id=\"").append(uicomponent.getId()).append("\"").append("class=\"").append(uicomponent.getId()).append("\">");
+
uiApp.renderChildren();
context.getWriter().append("</div>");
}
14 years, 8 months
gatein SVN: r3021 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 03:11:09 -0400 (Mon, 10 May 2010)
New Revision: 3021
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
Log:
GTNPORTAL-1165:Remove useless properties in UIPortletApplication
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java 2010-05-10 05:58:13 UTC (rev 3020)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java 2010-05-10 07:11:09 UTC (rev 3021)
@@ -45,21 +45,25 @@
{
}
+ @Deprecated
public int getMinWidth()
{
return minWidth;
}
-
+
+ @Deprecated
public void setMinWidth(int minWidth)
{
this.minWidth = minWidth;
}
-
+
+ @Deprecated
public int getMinHeight()
{
return minHeight;
}
-
+
+ @Deprecated
public void setMinHeight(int minHeight)
{
this.minHeight = minHeight;
14 years, 8 months
gatein SVN: r3020 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 01:58:13 -0400 (Mon, 10 May 2010)
New Revision: 3020
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js
Log:
GTNPORTAL-1101:Fix problem with page editor when change language to Arabic
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js 2010-05-10 05:57:57 UTC (rev 3019)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/Browser.js 2010-05-10 05:58:13 UTC (rev 3020)
@@ -454,9 +454,9 @@
/**
* find the x position of the mouse relative to object
*/
-Browser.prototype.findMouseRelativeX = function(object, e) {
+Browser.prototype.findMouseRelativeX = function(object, e, isRTL) {
var posx = -1 ;
- var posXObject = eXo.core.Browser.findPosX(object) ;
+ var posXObject = eXo.core.Browser.findPosX(object,isRTL) ;
/*
* posXObject is added more 3px on IE6
14 years, 8 months
gatein SVN: r3019 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 01:57:57 -0400 (Mon, 10 May 2010)
New Revision: 3019
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
Log:
GTNPORTAL-1101:Fix problem with page editor when change language to Arabic
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-05-10 05:57:17 UTC (rev 3018)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIPopupWindow.js 2010-05-10 05:57:57 UTC (rev 3019)
@@ -194,7 +194,8 @@
UIPopupWindow.prototype.resize = function(evt) {
var targetPopup = document.getElementById(eXo.webui.UIPopupWindow.popupId) ;
var content = eXo.core.DOMUtil.findFirstDescendantByClass(targetPopup, "div", "PopupContent") ;
- var pointerX = eXo.core.Browser.findMouseRelativeX(targetPopup, evt) ;
+ var isRTL = eXo.core.I18n.isRT();
+ var pointerX = eXo.core.Browser.findMouseRelativeX(targetPopup, evt, isRTL) ;
var pointerY = eXo.core.Browser.findMouseRelativeY(targetPopup, evt) ;
var delta = eXo.core.Browser.findPosYInContainer(content,targetPopup) +
content.style.borderWidth + content.style.padding + content.style.margin;
@@ -202,6 +203,11 @@
//TODO: Check if the bottom is not null before assign new value to 'content.style.height'
if((pointerY-delta) > 0) content.style.height = (pointerY-delta-POPUP_WINDOW_BOTTOM_HEIGHT)+"px" ;
targetPopup.style.height = "auto";
+
+ if(isRTL){
+ pointerX = (-1) * pointerX
+ }
+
if(pointerX > 200) targetPopup.style.width = (pointerX+5) + "px" ;
} ;
14 years, 8 months
gatein SVN: r3018 - portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow.
by do-not-reply@jboss.org
Author: thanh_tung_do
Date: 2010-05-10 01:57:17 -0400 (Mon, 10 May 2010)
New Revision: 3018
Modified:
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
Log:
GTNPORTAL-1101:replace resize button on page_editor when change language to Arabic (isRTL=true)
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2010-05-10 03:36:37 UTC (rev 3017)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2010-05-10 05:57:17 UTC (rev 3018)
@@ -117,7 +117,8 @@
cursor: ne-resize; /* orientation=rt */
position: absolute;
bottom: 8px;
- right: 8px;
+ right: 8px; /* orientation=lt */
+ left: 8px; /* orientation=rt */
}
.UIPopupWindow .BottomLeftCornerDecorator {
14 years, 8 months