Author: tan_pham_dinh
Date: 2009-12-30 06:45:39 -0500 (Wed, 30 Dec 2009)
New Revision: 1151
Removed:
portal/trunk/web/portal/src/main/webapp/fckeditor/
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java
Log:
FCK is useless in Gatein. Remove it
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java 2009-12-30
06:45:52 UTC (rev 1150)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java 2009-12-30
11:45:39 UTC (rev 1151)
@@ -89,6 +89,7 @@
public void execute(ServletContext scontext, PortalContainer
portalContainer)
{
register(scontext, portalContainer);
+ skinService.registerContext(scontext);
}
};
PortalContainer.addInitTask(scontext, task, portalContainerName);
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2009-12-30
06:45:52 UTC (rev 1150)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2009-12-30
11:45:39 UTC (rev 1151)
@@ -171,8 +171,8 @@
public void addPortalSkin(String module, String skinName, String cssPath,
ServletContext scontext, boolean overwrite)
{
- // Triggers a put if absent
- mainResolver.registerContext(scontext);
+ // // Triggers a put if absent
+ // mainResolver.registerContext(scontext);
availableSkins_.add(skinName);
SkinKey key = new SkinKey(module, skinName);
@@ -226,8 +226,8 @@
public void addSkin(String module, String skinName, String cssPath, ServletContext
scontext, boolean overwrite)
{
- // Triggers a put if absent
- mainResolver.registerContext(scontext);
+ // // Triggers a put if absent
+ // mainResolver.registerContext(scontext);
availableSkins_.add(skinName);
SkinKey key = new SkinKey(module, skinName);
@@ -556,6 +556,11 @@
return availableSkin.toArray(new String[availableSkin.size()]);
}
+ public void registerContext(ServletContext sContext)
+ {
+ mainResolver.registerContext(sContext);
+ }
+
@Managed
@ManagedDescription("Reload all skins")
public void reloadSkins()
@@ -567,9 +572,7 @@
@Managed
@ManagedDescription("Reload a specified skin")
- public void reloadSkin(@ManagedDescription("The skin id")
- @ManagedName("skinId")
- String skinId)
+ public void reloadSkin(@ManagedDescription("The skin id")
@ManagedName("skinId") String skinId)
{
ltCache.remove(skinId);
rtCache.remove(skinId);
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml 2009-12-30
06:45:52 UTC (rev 1150)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml 2009-12-30
11:45:39 UTC (rev 1151)
@@ -31,12 +31,5 @@
<skin-name>Default</skin-name>
<css-path>/templates/skin/webui/component/UIHomePagePortlet/DefaultStylesheet.css</css-path>
</portlet-skin>
- <!-- External libraries -->
- <javascript>
- <param>
- <js-module>FCKEditor</js-module>
- <js-path>/fckeditor/fckeditor.js</js-path>
- </param>
- </javascript>
</gatein-resources>
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java 2009-12-30
06:45:52 UTC (rev 1150)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java 2009-12-30
11:45:39 UTC (rev 1151)
@@ -21,7 +21,7 @@
import com.sun.syndication.io.impl.PropertiesLoader;
-import org.exoplatform.container.PortalContainer;
+import org.exoplatform.web.resource.config.xml.FCKConfigListener;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -42,7 +42,6 @@
*/
public class FCKEditor
{
-
private final static String DEFAULT_HEIGHT = "300".intern();
private final static String DEFAULT_WIDTH = "100%".intern();
@@ -106,8 +105,8 @@
public FCKEditor(final HttpServletRequest request, final String instanceName)
{
- this(request, instanceName, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_TOOLBAR, null,
"/"
- + PortalContainer.getCurrentPortalContainerName() + "/fckeditor");
+ this(request, instanceName, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_TOOLBAR, null,
+ FCKConfigListener.FCK_CONTEXT_PATH + "/fckeditor");
}
/**