Author: julien_viet
Date: 2010-07-23 17:58:05 -0400 (Fri, 23 Jul 2010)
New Revision: 3700
Added:
portal/trunk/component/web/resources/
portal/trunk/component/web/resources/pom.xml
portal/trunk/component/web/resources/src/
portal/trunk/component/web/resources/src/main/
portal/trunk/component/web/resources/src/main/java/
portal/trunk/component/web/resources/src/main/java/gatein_resources_1_0.xsd
portal/trunk/component/web/resources/src/main/java/gatein_resources_1_1.xsd
portal/trunk/component/web/resources/src/main/java/org/
portal/trunk/component/web/resources/src/main/java/org/exoplatform/
portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal/
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/JavascriptManager.java
portal/trunk/component/web/resources/src/test/
portal/trunk/component/web/resources/src/test/java/
portal/trunk/component/web/resources/src/test/java/org/
portal/trunk/component/web/resources/src/test/java/org/exoplatform/
portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal/
Removed:
portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd
portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/
portal/trunk/component/resources/src/main/java/org/exoplatform/web/
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/
Modified:
portal/trunk/component/web/controller/pom.xml
portal/trunk/component/web/pom.xml
portal/trunk/packaging/jboss-as/ear/pom.xml
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
portal/trunk/pom.xml
Log:
GTNPORTAL-1374 : component.web modularization / move resource for web into the
component.web.resources module (putting them in component.resources in the first place was
a mistake)
Deleted: portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd
===================================================================
--- portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd 2010-07-23
21:22:58 UTC (rev 3699)
+++ portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd 2010-07-23
21:58:05 UTC (rev 3700)
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<xs:schema
-
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_0&q...
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0"
-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <!-- The root element type that contains the various resource declarations -->
- <xs:element name="gatein-resources">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="portal-skin" type="portal-skin" />
- <xs:element name="portlet-skin" type="portlet-skin" />
- <xs:element name="window-style" type="window-style" />
- <xs:element name="javascript" type="javascript" />
- <xs:element name="resource-bundle" type="resource-bundle"
/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <!-- Declares a portal skin resource -->
- <xs:complexType name="portal-skin">
- <xs:sequence>
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a portlet skin resource -->
- <xs:complexType name="portlet-skin">
- <xs:sequence>
- <!-- The portlet application name -->
- <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The portlet name -->
- <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The name of the skin to load -->
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The css path of the skin relative to the application context -->
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- Overwrite -->
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a window style -->
- <xs:complexType name="window-style" mixed="true">
- <xs:sequence>
-
- <!-- The window style name -->
- <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The window style theme -->
- <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- The window style theme -->
- <xs:complexType name="style-theme">
- <xs:sequence>
- <!-- The theme name -->
- <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a javascript resource -->
- <xs:complexType name="javascript">
- <xs:sequence>
- <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="param">
- <xs:sequence>
- <!-- The javascript module -->
- <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript path -->
- <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript priority -->
- <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a resource bundle -->
- <xs:complexType name="resource-bundle">
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Deleted: portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd
===================================================================
--- portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd 2010-07-23
21:22:58 UTC (rev 3699)
+++ portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd 2010-07-23
21:58:05 UTC (rev 3700)
@@ -1,116 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
- ~
- ~ This is free software; you can redistribute it and/or modify it
- ~ under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ This software is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public
- ~ License along with this software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
-<xs:schema
-
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_1&q...
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1"
-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <!-- The root element type that contains the various resource declarations -->
- <xs:element name="gatein-resources">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="portal-skin" type="portal-skin" />
- <xs:element name="portlet-skin" type="portlet-skin" />
- <xs:element name="window-style" type="window-style" />
- <xs:element name="javascript" type="javascript" />
- <xs:element name="resource-bundle" type="resource-bundle"
/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <!-- Declares a portal skin resource -->
- <xs:complexType name="portal-skin">
- <xs:sequence>
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="skin-module" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a portlet skin resource -->
- <xs:complexType name="portlet-skin">
- <xs:sequence>
- <!-- The portlet application name -->
- <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The portlet name -->
- <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The name of the skin to load -->
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The css path of the skin relative to the application context -->
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- Overwrite -->
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a window style -->
- <xs:complexType name="window-style" mixed="true">
- <xs:sequence>
-
- <!-- The window style name -->
- <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The window style theme -->
- <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- The window style theme -->
- <xs:complexType name="style-theme">
- <xs:sequence>
- <!-- The theme name -->
- <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a javascript resource -->
- <xs:complexType name="javascript">
- <xs:sequence>
- <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="param">
- <xs:sequence>
- <!-- The javascript module -->
- <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript path -->
- <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript priority -->
- <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a resource bundle -->
- <xs:complexType name="resource-bundle">
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Modified: portal/trunk/component/web/controller/pom.xml
===================================================================
--- portal/trunk/component/web/controller/pom.xml 2010-07-23 21:22:58 UTC (rev 3699)
+++ portal/trunk/component/web/controller/pom.xml 2010-07-23 21:58:05 UTC (rev 3700)
@@ -41,7 +41,7 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.resources</artifactId>
+ <artifactId>exo.portal.component.web.resources</artifactId>
</dependency>
</dependencies>
</project>
Modified: portal/trunk/component/web/pom.xml
===================================================================
--- portal/trunk/component/web/pom.xml 2010-07-23 21:22:58 UTC (rev 3699)
+++ portal/trunk/component/web/pom.xml 2010-07-23 21:58:05 UTC (rev 3700)
@@ -35,6 +35,7 @@
<module>controller</module>
<module>security</module>
<module>server</module>
+ <module>resources</module>
<module>api</module>
</modules>
</project>
Added: portal/trunk/component/web/resources/pom.xml
===================================================================
--- portal/trunk/component/web/resources/pom.xml (rev 0)
+++ portal/trunk/component/web/resources/pom.xml 2010-07-23 21:58:05 UTC (rev 3700)
@@ -0,0 +1,40 @@
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>exo.portal.component.web.resources</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn Portal Component Web Resources</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.resources</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
Copied: portal/trunk/component/web/resources/src/main/java/gatein_resources_1_0.xsd (from
rev 3698, portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd)
===================================================================
--- portal/trunk/component/web/resources/src/main/java/gatein_resources_1_0.xsd
(rev 0)
+++ portal/trunk/component/web/resources/src/main/java/gatein_resources_1_0.xsd 2010-07-23
21:58:05 UTC (rev 3700)
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<xs:schema
+
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_0&q...
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle"
/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Copied: portal/trunk/component/web/resources/src/main/java/gatein_resources_1_1.xsd (from
rev 3698, portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd)
===================================================================
--- portal/trunk/component/web/resources/src/main/java/gatein_resources_1_1.xsd
(rev 0)
+++ portal/trunk/component/web/resources/src/main/java/gatein_resources_1_1.xsd 2010-07-23
21:58:05 UTC (rev 3700)
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<xs:schema
+
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_1&q...
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle"
/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="skin-module" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Copied: portal/trunk/component/web/resources/src/main/java/org/exoplatform/portal (from
rev 3698, portal/trunk/component/resources/src/main/java/org/exoplatform/portal)
Copied: portal/trunk/component/web/resources/src/main/java/org/exoplatform/web (from rev
3698, portal/trunk/component/resources/src/main/java/org/exoplatform/web)
Copied:
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/JavascriptManager.java
(from rev 3699,
portal/trunk/component/resources/src/main/java/org/exoplatform/web/application/JavascriptManager.java)
===================================================================
---
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/JavascriptManager.java
(rev 0)
+++
portal/trunk/component/web/resources/src/main/java/org/exoplatform/web/application/JavascriptManager.java 2010-07-23
21:58:05 UTC (rev 3700)
@@ -0,0 +1,166 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.web.application;
+
+import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.web.application.javascript.JavascriptConfigService;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+
+/**
+ * Created by The eXo Platform SAS
+ * Mar 27, 2007
+ */
+public class JavascriptManager
+{
+
+ /** . */
+ private ArrayList<String> data = new ArrayList<String>(100);
+
+ /** . */
+ private ArrayList<String> customizedOnloadJavascript = null;
+
+ /** . */
+ private JavascriptConfigService jsSrevice_;
+
+ public JavascriptManager()
+ {
+ jsSrevice_ =
+
(JavascriptConfigService)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(
+ JavascriptConfigService.class);
+ }
+
+ public void addJavascript(CharSequence s)
+ {
+ if (s != null)
+ {
+ data.add(s instanceof String ? (String)s : s.toString());
+ data.add(" \n");
+ }
+ }
+
+ public void importJavascript(CharSequence s)
+ {
+ if (s != null)
+ {
+ if (!jsSrevice_.isModuleLoaded(s) || PropertyManager.isDevelopping())
+ {
+ data.add("eXo.require('");
+ data.add(s instanceof String ? (String)s : s.toString());
+ data.add("'); \n");
+ }
+ }
+ }
+
+ public void importJavascript(String s, String location)
+ {
+ if (s != null && location != null)
+ {
+ if (!jsSrevice_.isModuleLoaded(s) || PropertyManager.isDevelopping())
+ {
+ data.add("eXo.require('");
+ data.add(s);
+ data.add("', '");
+ data.add(location);
+ if (!location.endsWith("/"))
+ {
+ data.add("/");
+ }
+ data.add("'); \n");
+ }
+ }
+ }
+
+ public void addOnLoadJavascript(CharSequence s)
+ {
+ if (s != null)
+ {
+ String id = Integer.toString(Math.abs(s.hashCode()));
+ data.add("eXo.core.Browser.addOnLoadCallback('mid");
+ data.add(id);
+ data.add("',");
+ data.add(s instanceof String ? (String)s : s.toString());
+ data.add("); \n");
+ }
+ }
+
+ public void addOnResizeJavascript(CharSequence s)
+ {
+ if (s != null)
+ {
+ String id = Integer.toString(Math.abs(s.hashCode()));
+ data.add("eXo.core.Browser.addOnResizeCallback('mid");
+ data.add(id);
+ data.add("',");
+ data.add(s instanceof String ? (String)s : s.toString());
+ data.add("); \n");
+ }
+ }
+
+ public void addOnScrollJavascript(CharSequence s)
+ {
+ if (s != null)
+ {
+ String id = Integer.toString(Math.abs(s.hashCode()));
+ data.add("eXo.core.Browser.addOnScrollCallback('mid");
+ data.add(id);
+ data.add("',");
+ data.add(s instanceof String ? (String)s : s.toString());
+ data.add("); \n");
+ }
+ }
+
+ public void writeJavascript(Writer writer) throws IOException
+ {
+ for (int i = 0;i < data.size();i++)
+ {
+ String s = data.get(i);
+ writer.write(s);
+ }
+ }
+
+ public void addCustomizedOnLoadScript(CharSequence s)
+ {
+ if (s != null)
+ {
+ if (customizedOnloadJavascript == null)
+ {
+ customizedOnloadJavascript = new ArrayList<String>(30);
+ }
+ customizedOnloadJavascript.add(s instanceof String ? (String)s : s.toString());
+ customizedOnloadJavascript.add("\n");
+ }
+ }
+
+ public void writeCustomizedOnLoadScript(Writer writer) throws IOException
+ {
+ if (customizedOnloadJavascript != null)
+ {
+ for (int i = 0;i < customizedOnloadJavascript.size();i++)
+ {
+ String s = customizedOnloadJavascript.get(i);
+ writer.write(s);
+ }
+ }
+ }
+}
Copied: portal/trunk/component/web/resources/src/test/java/org/exoplatform/portal (from
rev 3698, portal/trunk/component/resources/src/test/java/org/exoplatform/portal)
Modified: portal/trunk/packaging/jboss-as/ear/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-23 21:22:58 UTC (rev 3699)
+++ portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-23 21:58:05 UTC (rev 3700)
@@ -104,6 +104,10 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.resources</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.portal</artifactId>
</dependency>
<dependency>
Modified: portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
---
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-07-23
21:22:58 UTC (rev 3699)
+++
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-07-23
21:58:05 UTC (rev 3700)
@@ -112,6 +112,9 @@
addDependency(module.component.web.controller).
addDependency(module.component.scripting);
+ module.component.web.resources =
+ new Project("org.exoplatform.portal",
"exo.portal.component.web.resources", "jar", module.version);;
+
module.component.web.api =
new Project("org.exoplatform.portal",
"exo.portal.component.web.api", "jar", module.version);
@@ -155,6 +158,7 @@
addDependency(module.component.web.server).
addDependency(module.component.web.security).
addDependency(module.component.web.api).
+ addDependency(module.component.web.resources).
addDependency(module.component.web.controller);
module.webui.portlet =
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-07-23 21:22:58 UTC (rev 3699)
+++ portal/trunk/pom.xml 2010-07-23 21:58:05 UTC (rev 3700)
@@ -391,6 +391,11 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.resources</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.portal</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</dependency>