You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/09/21 13:36:04 UTC
svn commit: r999327 [2/3] - in /ofbiz/branches/jquery: ./
applications/commonext/data/helpdata/ applications/content/widget/content/
applications/order/script/org/ofbiz/order/customer/
applications/order/webapp/ordermgr/WEB-INF/actions/entry/ applicati...
Modified: ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/PortalPageScreens.xml Tue Sep 21 11:36:01 2010
@@ -257,4 +257,36 @@ under the License.
</widgets>
</section>
</screen>
+ <screen name="EditPortalPortletAttributes">
+ <section>
+ <actions>
+ <entity-one entity-name="PortalPortlet" value-field="portalPortlet"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}">
+ <include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/>
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="EditPortalPageColumnWidth">
+ <section>
+ <actions>
+ <entity-one entity-name="PortalPageColumn" value-field="portalPageColumn"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet title="Set column width: ${portalPortlet.portletName}">
+ <include-form name="EditPortalPageColumnWidth" location="component://common/widget/PortalPageForms.xml"/>
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
Modified: ofbiz/branches/jquery/framework/common/widget/PortletEditForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/PortletEditForms.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/widget/PortletEditForms.xml (original)
+++ ofbiz/branches/jquery/framework/common/widget/PortletEditForms.xml Tue Sep 21 11:36:01 2010
@@ -21,7 +21,7 @@ under the License.
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
- <form name="CommonPortletEdit" type="single" target="setPortalPortletAttributes${Adm}" title="" default-map-name="attributeMap">
+ <form name="CommonPortletEdit" type="single" target="setPortalPortletAttributes" title="" default-map-name="attributeMap">
<actions>
<service service-name="getPortletAttributes">
<field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
Modified: ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/branches/jquery/framework/example/config/ExampleUiLabels.xml Tue Sep 21 11:36:01 2010
@@ -533,6 +533,10 @@
<value xml:lang="en">Geolocation via address</value>
<value xml:lang="fr">Géolocalisation par l'adresse</value>
</property>
+ <property key="ExamplePortalPageWidgetExamples">
+ <value xml:lang="en">include-portal-page widget example</value>
+ <value xml:lang="it">Esempio widget include-portal-page</value>
+ </property>
<property key="ExamplePortletFirst">
<value xml:lang="en">Hi, this is a first example of portlet</value>
<value xml:lang="it">Salve, questo è il primo esempio di portlet</value>
Modified: ofbiz/branches/jquery/framework/example/data/ExamplePortalSeedData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/data/ExamplePortalSeedData.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/data/ExamplePortalSeedData.xml (original)
+++ ofbiz/branches/jquery/framework/example/data/ExamplePortalSeedData.xml Tue Sep 21 11:36:01 2010
@@ -21,11 +21,16 @@ under the License.
<entity-engine-xml>
<!-- PortalPortlet Seed Data: system pages -->
<PortalPage portalPageId="EXAMPLE" sequenceNum="0" portalPageName="Example Portal Page" description="The default example OFBiz portal page" ownerUserLoginId="_NA_"/>
- <PortalPageColumn portalPageId="EXAMPLE" columnSeqId="00001" columnWidthPercentage="50"/>
+ <PortalPageColumn portalPageId="EXAMPLE" columnSeqId="00001" columnWidthPixels="400"/>
<PortalPageColumn portalPageId="EXAMPLE" columnSeqId="00002"/><!-- no width in pixels or percent, use the rest of the space available -->
-
<PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="EXAMPLE_1" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/>
<PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="EXAMPLE_3" portletSeqId="00001" columnSeqId="00002" sequenceNum="1"/>
+ <PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00001" columnSeqId="00001"/>
+ <PortletAttribute portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00001" attrName="contentId" attrValue="HELP_BIRT"/>
+ <PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00002" columnSeqId="00002"/>
+ <PortletAttribute portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00002" attrName="contentId" attrValue="SETUP_firstCatalog"/>
+ <PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00003" columnSeqId="00002"/>
+ <PortletAttribute portalPageId="EXAMPLE" portalPortletId="showContent" portletSeqId="00003" attrName="contentId" attrValue="HELP_ACCOUNTING"/>
<PortalPage portalPageId="EXAMPLE1" sequenceNum="100" parentPortalPageId="EXAMPLE" portalPageName="Example Portal Page 1" description="Portal page 1" ownerUserLoginId="_NA_"/>
<PortalPageColumn portalPageId="EXAMPLE1" columnSeqId="00001"/>
Modified: ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml Tue Sep 21 11:36:01 2010
@@ -190,6 +190,7 @@ under the License.
</request-map>
<request-map uri="FormWidgetExamples"><security https="true" auth="true"/><response name="success" type="view" value="FormWidgetExamples"/></request-map>
+ <request-map uri="PortalPageWidgetExamples"><security https="true" auth="true"/><response name="success" type="view" value="PortalPageWidgetExamples"/></request-map>
<request-map uri="LookupExampleFeature"><security https="true" auth="true"/><response name="success" type="view" value="LookupExampleFeature"/></request-map>
<request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
@@ -250,6 +251,7 @@ under the License.
<view-map name="EditExampleFeatureExampleAppls" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#EditExampleFeatureExampleAppls"/>
<view-map name="FormWidgetExamples" type="screen" page="component://example/widget/example/FormWidgetExampleScreens.xml#FormWidgetExamples"/>
+ <view-map name="PortalPageWidgetExamples" type="screen" page="component://example/widget/example/ExampleScreens.xml#PortalPageWidgetExampleScreen"/>
<view-map name="LookupExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#LookupExampleFeature"/>
<view-map name="LookupPartyName" type="screen" page="component://example/widget/example/FormWidgetExampleLookupScreens.xml#LookupPartyName"/>
Modified: ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/ExampleMenus.xml Tue Sep 21 11:36:01 2010
@@ -24,6 +24,7 @@ under the License.
<menu-item name="ExampleMenuItem" title="${uiLabelMap.ExampleExample}"><link target="FindExample"/></menu-item>
<menu-item name="ExampleFeature" title="${uiLabelMap.ExampleFeature}"><link target="FindExampleFeature"/></menu-item>
<menu-item name="FormWidgetExamples" title="${uiLabelMap.ExampleFormWidgetExamples}"><link target="FormWidgetExamples"/></menu-item>
+ <menu-item name="PortalPageWidgetExamples" title="${uiLabelMap.ExamplePortalPageWidgetExamples}"><link target="PortalPageWidgetExamples"/></menu-item>
<menu-item name="AjaxExample" title="${uiLabelMap.ExampleAjaxExamples}"><link target="authview/findExampleAjax"/></menu-item>
<menu-item name="portalPage" parent-portal-page-value="${parameters.parentPortalPageId}"/>
<menu-item name="Dashboard" title="${uiLabelMap.ExampleDashboard}" align-style="opposed">
Modified: ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/ExampleScreens.xml Tue Sep 21 11:36:01 2010
@@ -466,4 +466,18 @@ under the License.
</widgets>
</section>
</screen>
+ <screen name="PortalPageWidgetExampleScreen">
+ <section>
+ <actions>
+ <set field="tabButtonItem" value="PortalPageWidgetExamples"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <include-portal-page id="EXAMPLE" edit-mode="${parameters.editmode}"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
Modified: ofbiz/branches/jquery/framework/example/widget/example/PortletEditForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/PortletEditForms.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/PortletEditForms.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/PortletEditForms.xml Tue Sep 21 11:36:01 2010
@@ -22,7 +22,7 @@ under the License.
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="ExamplePortlet1Edit" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
- <field name="ItemsToShow" entry-name="attributeMap.ItemsToShow">
+ <field name="ItemsToShow">
<drop-down allow-empty="false">
<option key="5"/>
<option key="15"/>
@@ -32,20 +32,17 @@ under the License.
<option key="35"/>
</drop-down>
</field>
- <field name="SpecificTitle" entry-name="attributeMap.SpecificTitle">
- <text/>
- </field>
- <field name="Nuovo" entry-name="attributeMap.Nuovo">
+ <field name="SpecificTitle">
<text/>
</field>
<field name="updateButton"><submit/></field>
</form>
<form name="ExamplePortlet3Edit" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
- <field name="SpecificTitle" entry-name="attributeMap.SpecificTitle">
+ <field name="SpecificTitle">
<text/>
</field>
- <field name="SpecificSubTitle" entry-name="attributeMap.SpecificSubTitle">
+ <field name="SpecificSubTitle">
<text/>
</field>
<field name="updateButton"><submit/></field>
Modified: ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml (original)
+++ ofbiz/branches/jquery/framework/example/widget/example/PortletScreens.xml Tue Sep 21 11:36:01 2010
@@ -25,8 +25,6 @@ under the License.
<section>
<actions>
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
- <!-- TODO: figure out why this isn't getting the request object and requestAttributes is not updated either: <script location="component://common/script/org/ofbiz/common/PortalPageMethods.xml#getPortletAttributes"/>-->
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
</actions>
<widgets>
<label text="${uiLabelMap.ExamplePortletFirst}"/>
@@ -50,7 +48,6 @@ under the License.
<section>
<actions>
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
- <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
</actions>
<widgets>
<container style="leftclear">
Modified: ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/getDependentDropdownValues.js Tue Sep 21 11:36:01 2010
@@ -27,12 +27,26 @@
// descName = name of the dependent dropdown description
// selected = optional name of a selected option
// callback = optional javascript function called at end
-function getDependentDropdownValues(request, paramKey, paramField, targetField, responseName, keyName, descName, selected, callback) {
+// inputField = optional name of an input field to use instead of a dropdown (this will be extended later to use an of autocompleted dropdown, instead of dropdown or a lookup, when there are too much values to populate)
+// hide = optional argument, if true the dependend dropdown field (targetField) will be hidden when no options are available else only disabled. False by default.
+function getDependentDropdownValues(request, paramKey, paramField, targetField, responseName, keyName, descName, selected, callback, hide) {
data = [ { name: paramKey, value: jQuery('#' + paramField).val()} ]; // get requested value from parent dropdown field
// Call jQuery.post with a json formatted result (see end of code)
jQuery.post(request, data, function(result) {
+ target = '#' + targetField;
optionList = '';
list = result[responseName];
+ // this is to handle a specific case where an input field is needed, uses inputField for the field name
+ if (!list) {
+ jQuery(target).hide();
+ jQuery(target).after("<input type='text' name=arguments[9] id=targetField + '_input' size=3>");
+ return;
+ } else {
+ if (jQuery(target + '_input')) {
+ jQuery(target + '_input').remove();
+ jQuery(target).show();
+ }
+ }
// Create and show dependent select options
jQuery.each(list, function (key, value) {
if (typeof value == 'string') {
@@ -50,16 +64,21 @@ function getDependentDropdownValues(requ
}
}
});
- target = '#' + targetField;
jQuery(target).html(optionList);
- // Hide/show the dependent dropdown
- if ((list.size() < 1) || ((list.size() == 1) && list[0].indexOf("_NA_") >=0)) {
- if (jQuery(target).is(':visible')) {
- jQuery(target).fadeOut();
- }
+ // Hide/show the dependent dropdown if hide=true else simply disable/enable
+ if ((list.size() < 1) || ((list.size() == 1) && list[0].indexOf("_NA_") >=0)) {
+ jQuery(target).attr('disabled', 'disabled');
+ if (hide) {
+ if (jQuery(target).is(':visible')) {
+ jQuery(target).fadeOut();
+ }
+ }
} else {
- if (!jQuery(target).is(':visible')) {
- jQuery(target).fadeIn();
+ jQuery(target).removeAttr('disabled');
+ if (hide) {
+ if (!jQuery(target).is(':visible')) {
+ jQuery(target).fadeIn();
+ }
}
}
if (callback != null) eval(callback);
Modified: ofbiz/branches/jquery/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/selectall.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/selectall.js Tue Sep 21 11:36:01 2010
@@ -661,9 +661,31 @@ function toggleLeftColumn(){
}
function waitSpinnerShow() {
- document.getElementById("wait-spinner").style.visibility = 'visible';
+ var spinner = document.getElementById("wait-spinner");
+ if (spinner == null) {
+ return;
+ }
+ spinner.style.display = 'block';
+ var bdy = document.body;
+
+ var dimensions = $(spinner).getDimensions();
+ var lookupLeft = (bdy.offsetWidth / 2) - (dimensions.width / 2);
+ var scrollOffY = document.viewport.getScrollOffsets().top;
+ var winHeight = document.viewport.getHeight();
+ var lookupTop = (scrollOffY + winHeight / 2) - (dimensions.height / 2);
+
+ spinner.style.left = lookupLeft + "px";
+ spinner.style.top = lookupTop + "px";
+ Effect.Appear(spinner, {duration: 0.3});
}
function waitSpinnerHide() {
- document.getElementById("wait-spinner").style.visibility = 'hidden';
-}
\ No newline at end of file
+ var spinner = document.getElementById("wait-spinner");
+ if (spinner == null) {
+ return;
+ }
+ Effect.Fade(spinner, {duration: 0.3});
+ window.setTimeout(function() {
+ spinner.style.display = 'none';
+ }, 400);
+}
Modified: ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java (original)
+++ ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/ftl/FreeMarkerViewHandler.java Tue Sep 21 11:36:01 2010
@@ -53,11 +53,7 @@ public class FreeMarkerViewHandler exten
public void init(ServletContext context) throws ViewHandlerException {
this.servletContext = context;
config.setCacheStorage(new OfbizCacheStorage("unknown"));
- try {
- config.setDirectoryForTemplateLoading(new File(servletContext.getRealPath("/")));
- } catch (IOException e) {
- throw new ViewHandlerException("Could not create file for webapp root path", e);
- }
+ config.setServletContextForTemplateLoading(context, "/");
}
public void render(String name, String page, String info, String contentType, String encoding,
Modified: ofbiz/branches/jquery/framework/webslinger/webapp/webslinger/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webslinger/webapp/webslinger/WEB-INF/web.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webslinger/webapp/webslinger/WEB-INF/web.xml (original)
+++ ofbiz/branches/jquery/framework/webslinger/webapp/webslinger/WEB-INF/web.xml Tue Sep 21 11:36:01 2010
@@ -44,10 +44,6 @@ under the License.
<param-value>60000</param-value>
</init-param>
<init-param>
- <param-name>ofbiz.mapping.default-file-system-id</param-name>
- <param-value>1</param-value>
- </init-param>
- <init-param>
<param-name>org.webslinger.servlet.WebslingerServlet.WebslingerServletContextFactory</param-name>
<param-value>org.ofbiz.webslinger.WebslingerContextMapper</param-value>
</init-param>
Modified: ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml Tue Sep 21 11:36:01 2010
@@ -307,6 +307,7 @@
<property key="PageTitleFindPortalPage">
<value xml:lang="en">Find Portal page</value>
<value xml:lang="fr">Rech. page portail</value>
+ <value xml:lang="it">Ricerca pagine portale</value>
</property>
<property key="PageTitleFindUtilCache">
<value xml:lang="de">Cache Wartungsseite</value>
Modified: ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/controller.xml Tue Sep 21 11:36:01 2010
@@ -21,6 +21,7 @@ under the License.
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
<include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+ <include location="component://common/webcommon/WEB-INF/portal-controller.xml"/>
<include location="component://common/webcommon/WEB-INF/tempexpr-controller.xml"/>
<include location="component://testtools/webapp/testtools/WEB-INF/controller.xml"/>
<description>WebTools Site Configuration File</description>
@@ -527,10 +528,6 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="EditPortalPage"/>
</request-map>
- <request-map uri="ManagePortalPagesAdm">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="EditPortalPage"/>
- </request-map>
<request-map uri="DuplicatePortalPage">
<security https="true" auth="true"/>
<event type="simple" invoke="duplicatePortalPage" path="component://common/script/org/ofbiz/common/PortalPageMethods.xml"/>
@@ -553,66 +550,6 @@ under the License.
<response name="error" type="view" value="EditPortalPage"/>
</request-map>
- <!-- PortalPage detail administration, copy from portal-controller with response target change to EditPortalPage-->
- <request-map uri="addPortalPageColumnAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="addPortalPageColumn"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="deletePortalPageColumnAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="deletePortalPageColumn"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="AddPortletAdm">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="AddPortletAdm"/>
- </request-map>
- <request-map uri="updatePortalPageColumnAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="updatePortalPageColumn"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="movePortletToPortalPageAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="movePortletToPortalPage"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="deletePortalPagePortletAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="deletePortalPagePortlet"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="updatePortalPagePortletSeqAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="updatePortalPagePortletSeq"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="updatePortalPagePortletAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="updatePortalPagePortlet"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="createPortalPagePortletAdm">
- <security https="true" auth="true"/>
- <event type="service" invoke="createPortalPagePortlet"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
- <request-map uri="setPortalPortletAttributesAdm">
- <security https="true" auth="true"/>
- <event type="simple" invoke="setPortalPortletAttributes" path="component://common/script/org/ofbiz/common/PortalPageMethods.xml"/>
- <response name="success" type="view" value="EditPortalPage"/>
- <response name="error" type="view" value="EditPortalPage"/>
- </request-map>
-
<!-- Geo Management -->
<request-map uri="FindGeo"><security https="true" auth="true"/><response name="success" type="view" value="FindGeo" save-home-view="true"/></request-map>
<request-map uri="EditGeo"><security https="true" auth="true"/><response name="success" type="view" value="EditGeo"/></request-map>
@@ -735,7 +672,6 @@ under the License.
<view-map name="FindPortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#FindPortalPage"/>
<view-map name="CreatePortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#CreatePortalPage"/>
<view-map name="EditPortalPage" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#EditPortalPage"/>
- <view-map name="AddPortletAdm" type="screen" page="component://webtools/widget/PortalAdmScreens.xml#AddPortletAdm"/>
<!-- Geo Management -->
<view-map name="FindGeo" type="screen" page="component://webtools/widget/GeoManagementScreens.xml#FindGeo"/>
Modified: ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/PortalAdmForms.xml Tue Sep 21 11:36:01 2010
@@ -23,18 +23,27 @@ under the License.
<form name="FindPortalPages" type="single" target="FindPortalPage" default-entity-name="PortalPage">
<field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
- <field name="portalPageIdSearch" position="1" title="${uiLabelMap.CommonId}"><text-find/></field>
+ <field name="portalPageId" position="1" title="${uiLabelMap.CommonId}"><text-find/></field>
<field name="originalPortalPageId" position="2"><text-find/></field>
<field name="portalPageName" title="${uiLabelMap.CommonName}"><text-find/></field>
- <field name="parentPortalPageIdSearch" position="2" title="${uiLabelMap.FormFieldTitle_parentPortalPageId}"><text-find/></field>
+ <field name="parentPortalPageId" position="2"><text-find/></field>
<field name="description"><text-find/></field>
- <field name="securityGroupId" position="2" title="${uiLabelMap.PartySecurityGroupId}"><text-find/></field>
+ <field name="securityGroupId" position="2" title="${uiLabelMap.CommonSecurityGroupId}"><text-find/></field>
<field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
- <form name="ListPortalPages" type="list" list-name="pagesList" paginate-target="FindPortalPage" separate-columns="true"
+ <form name="ListPortalPages" type="list" list-name="listIt" paginate-target="FindPortalPage" separate-columns="true"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
- <field name="portalPageId" title="${uiLabelMap.CommonEdit}">
+ <actions>
+ <service service-name="performFind" result-map-list="listIt" >
+ <field-map field-name="inputFields" from-field="parameters"/>
+ <field-map field-name="entityName" value="PortalPage"/>
+ <field-map field-name="orderBy" from-field="parameters.sortField"/>
+ <field-map field-name="viewIndex" from-field="viewIndex"/>
+ <field-map field-name="viewSize" from-field="viewSize"/>
+ </service>
+ </actions>
+ <field name="portalPageId" title="${uiLabelMap.CommonId}" sort-field="true">
<hyperlink description="${portalPageId}" target="EditPortalPage">
<parameter param-name="portalPageId"/>
</hyperlink>
@@ -57,9 +66,11 @@ under the License.
</in-place-editor>
</display>
</field>
- <field name="sequenceNum"><display/></field>
- <field name="originalPortalPageId"><display/></field>
- <field name="ownerUserLoginId"><display/></field>
+ <field name="parentPortalPageId" sort-field="true"><display/></field>
+ <field name="sequenceNum" sort-field="true"><display/></field>
+ <field name="originalPortalPageId" sort-field="true"><display/></field>
+ <field name="ownerUserLoginId" sort-field="true"><display/></field>
+ <field name="securityGroupId" title="${uiLabelMap.CommonSecurityGroupId}" sort-field="true"><display/></field>
<field name="deleteLink" use-when="originalPortalPageId!=null" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
<hyperlink target="deletePortalPage" description="${uiLabelMap.CommonRevertPortalPage}">
<parameter param-name="portalPageId"/>
Modified: ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/PortalAdmScreens.xml Tue Sep 21 11:36:01 2010
@@ -28,18 +28,6 @@ under the License.
<actions>
<set field="headerItem" value="portalAdmin"/>
<set field="titleProperty" value="PageTitleFindPortalPage"/>
- <set field="inputFields" from-field="parameters"/>
- <set field="inputFields.portalPageId" from-field="parameters.portalPageIdSearch"/>
- <set field="inputFields.portalPageId_op" from-field="parameters.portalPageIdSearch_op"/>
- <set field="inputFields.portalPageId_ic" from-field="parameters.portalPageIdSearch_ic"/>
- <set field="inputFields.parentPortalPageId" from-field="parameters.parentPortalPageIdSearch"/>
- <set field="inputFields.parentPortalPageId_op" from-field="parameters.parentPortalPageIdSearch_op"/>
- <set field="inputFields.parentPortalPageId_ic" from-field="parameters.parentPortalPageIdSearch_ic"/>
- <service service-name="performFind" result-map="result" >
- <field-map field-name="entityName" value="PortalPage"/>
- <field-map field-name="orderBy" from-field="parameters.sortField"/>
- </service>
- <set field="pagesList" from-field="result.listIt"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -96,7 +84,6 @@ under the License.
<set field="layoutSettings.javaScripts[]" value="/images/myportal.js" global="true"/>
<set field="layoutSettings.styleSheets[+0]" value="/images/myportal.css" global="true"/>
<entity-one entity-name="PortalPage" value-field="portalPage"/>
- <set field="Adm" value="Adm"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -151,7 +138,7 @@ under the License.
<widgets>
<container id="portalContainerId">
<screenlet title="${uiLabelMap.CommonPortalEditPage}: ${portalPage.portalPageName} [${portalPage.portalPageId}]">
- <link target="addPortalPageColumnAdm" style="buttontext" text="${uiLabelMap.CommonAddColumn}">
+ <link target="addPortalPageColumn" style="buttontext" text="${uiLabelMap.CommonAddColumn}">
<parameter param-name="portalPageId" from-field="portalPage.portalPageId"/>
</link>
<platform-specific><html><html-template location="component://common/webcommon/portal/editPortalPage.ftl"/></html></platform-specific>
@@ -165,27 +152,4 @@ under the License.
</widgets>
</section>
</screen>
-
- <screen name="AddPortletAdm">
- <section>
- <actions>
- <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
- <set field="portalPageId" from-field="parameters.portalPageId"/>
- <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPortlets.groovy"/>
- <entity-one value-field="portalPage" entity-name="PortalPage" use-cache="true"/>
- <set field="Adm" value="Adm"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
- <screenlet title="${uiLabelMap.CommonAddPortletToPage}: ${portalPage.portalPageName} [${portalPageId}]">
- <include-form name="PortletCategoryAndPortlet" location="component://common/widget/PortalPageForms.xml"/>
- </screenlet>
- <platform-specific><html><html-template location="component://common/webcommon/portal/listPortalPortlets.ftl"/></html></platform-specific>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
</screens>
Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd Tue Sep 21 11:36:01 2010
@@ -1088,6 +1088,23 @@ under the License.
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
+ <xs:element name="include-portal-page" substitutionGroup="AllWidgets">
+ <xs:complexType>
+ <xs:attributeGroup ref="attlist.include-portal-page"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.include-portal-page">
+ <xs:attribute type="xs:string" name="id"/>
+ <xs:attribute name="edit-mode" default="false">
+ <xs:annotation><xs:documentation>Show the portal in edit mode.</xs:documentation></xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
<xs:element name="sub-content" substitutionGroup="AllWidgets">
<xs:complexType>
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java Tue Sep 21 11:36:01 2010
@@ -28,6 +28,7 @@ import org.ofbiz.widget.ModelWidget;
import org.ofbiz.widget.html.HtmlWidgetRenderer;
import org.ofbiz.widget.screen.ModelScreenWidget;
import org.ofbiz.widget.screen.ScreenStringRenderer;
+import org.ofbiz.entity.GenericValue;
/**
* Widget Library - HTML Form Renderer implementation
@@ -162,4 +163,26 @@ public class FoScreenRenderer extends Ht
public void renderScreenletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.Screenlet screenlet) throws IOException {
// TODO: not implemented
}
+
+ public void renderPortalPageBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
}
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Tue Sep 21 11:36:01 2010
@@ -39,6 +39,7 @@ import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.webapp.control.RequestHandler;
import org.ofbiz.webapp.taglib.ContentUrlTag;
@@ -880,4 +881,26 @@ public class HtmlScreenRenderer extends
appendWhitespace(writer);
}
}
+
+ public void renderPortalPageBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
}
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Tue Sep 21 11:36:01 2010
@@ -44,6 +44,7 @@ import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.template.FreeMarkerWorker;
import org.ofbiz.entity.Delegator;
+import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.LocalDispatcher;
import org.ofbiz.webapp.control.RequestHandler;
import org.ofbiz.webapp.taglib.ContentUrlTag;
@@ -58,10 +59,13 @@ import org.ofbiz.widget.html.HtmlScreenR
import org.ofbiz.widget.menu.MenuStringRenderer;
import org.ofbiz.widget.screen.ModelScreenWidget;
import org.ofbiz.widget.screen.ScreenStringRenderer;
+import org.ofbiz.widget.WidgetPortalPageWorker;
import freemarker.core.Environment;
import freemarker.template.Template;
import freemarker.template.TemplateException;
+import org.xml.sax.SAXException;
+import javax.xml.parsers.ParserConfigurationException;
public class MacroScreenRenderer implements ScreenStringRenderer {
@@ -474,7 +478,7 @@ public class MacroScreenRenderer impleme
Map<String, Object> parameters = FastMap.newInstance();
parameters.put("editContainerStyle", content.getEditContainerStyle(context));
parameters.put("editRequest", content.getEditRequest(context));
- parameters.put("enableEditValue", enableEditValue);
+ parameters.put("enableEditValue", enableEditValue == null ? "" : enableEditValue);
executeMacro(writer, "renderSubContentBegin", parameters);
}
@@ -558,7 +562,7 @@ public class MacroScreenRenderer impleme
parameters.put("editMode", editMode);
parameters.put("editContainerStyle", content.getEditContainerStyle(context));
parameters.put("editRequest", editRequest);
- parameters.put("enableEditValue", enableEditValue);
+ parameters.put("enableEditValue", enableEditValue == null ? "" : enableEditValue);
executeMacro(writer, "renderSubContentEnd", parameters);
}
@@ -776,4 +780,149 @@ public class MacroScreenRenderer impleme
executeMacro(writer, "renderScreenletPaginateMenu", parameters);
}
+ public void renderPortalPageBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ String portalPageId = portalPage.getId(context);
+ String originalPortalPageId = portalPage.getOriginalPortalPageId();
+ String editMode = portalPage.getEditMode(context);
+
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPageBegin ");
+ sr.append("originalPortalPageId=\"");
+ sr.append(originalPortalPageId);
+ sr.append("\" portalPageId=\"");
+ sr.append(portalPageId);
+ sr.append("\" editMode=\"");
+ sr.append(editMode);
+ sr.append("\" />");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPageEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ String editMode = portalPage.getEditMode(context);
+ HttpServletRequest request = (HttpServletRequest) context.get("request");
+
+ String actualRequest = request.getRequestURL().toString();
+ if (actualRequest.indexOf("?") < 0) {
+ actualRequest += "?";
+ } else if (!actualRequest.endsWith("?")) {
+ actualRequest += "&";
+ }
+ String editOnURL = actualRequest+"editmode=true";
+ String editOffURL = actualRequest+"editmode=false";
+
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPageEnd ");
+ sr.append("editMode=\"");
+ sr.append(editMode);
+ sr.append("\" editOnURL=\"");
+ sr.append(editOnURL);
+ sr.append("\" editOffURL=\"");
+ sr.append(editOffURL);
+ sr.append("\" />");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPageColumnBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ String portalPageId = portalPage.getId(context);
+ String originalPortalPageId = portalPage.getOriginalPortalPageId();
+ String columnSeqId = portalPageColumn.getString("columnSeqId");
+ String columnWidthPercentage = portalPageColumn.getString("columnWidthPercentage");
+ String columnWidthPixels = portalPageColumn.getString("columnWidthPixels");
+ String editMode = portalPage.getEditMode(context);
+
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPageColumnBegin ");
+ sr.append("originalPortalPageId=\"");
+ sr.append(originalPortalPageId);
+ sr.append("\" portalPageId=\"");
+ sr.append(portalPageId);
+ sr.append("\" columnSeqId=\"");
+ sr.append(columnSeqId);
+ sr.append("\" ");
+ if (UtilValidate.isNotEmpty(columnWidthPixels)) {
+ sr.append("width=\"");
+ sr.append(columnWidthPixels);
+ sr.append("px\"");
+ } else if (UtilValidate.isNotEmpty(columnWidthPercentage)) {
+ sr.append("width=\"");
+ sr.append(columnWidthPercentage);
+ sr.append("%\"");
+ }
+ sr.append(" editMode=\"");
+ sr.append(editMode);
+ sr.append("\" />");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPageColumnEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPageColumnEnd/>");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPagePortletBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ String portalPageId = portalPage.getId(context);
+ String originalPortalPageId = portalPage.getOriginalPortalPageId();
+ String portalPortletId = portalPortlet.getString("portalPortletId");
+ String portletSeqId = portalPortlet.getString("portletSeqId");
+ String editMode = portalPage.getEditMode(context);
+ String editFormName = portalPortlet.getString("editFormName");
+ String editFormLocation = portalPortlet.getString("editFormLocation");
+
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPagePortletBegin ");
+ sr.append("originalPortalPageId=\"");
+ sr.append(originalPortalPageId);
+ sr.append("\" portalPageId=\"");
+ sr.append(portalPageId);
+ sr.append("\" portalPortletId=\"");
+ sr.append(portalPortletId);
+ sr.append("\" portletSeqId=\"");
+ sr.append(portletSeqId);
+ sr.append("\" editMode=\"");
+ sr.append(editMode);
+ sr.append("\"");
+ if (UtilValidate.isNotEmpty(editFormName) && UtilValidate.isNotEmpty(editFormLocation)) {
+ sr.append(" editAttribute=\"true\"");
+ }
+ sr.append("/>");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPagePortletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ String editMode = portalPage.getEditMode(context);
+
+ StringWriter sr = new StringWriter();
+ sr.append("<@renderPortalPagePortletEnd ");
+ sr.append(" editMode=\"");
+ sr.append(editMode);
+ sr.append("\" />");
+ executeMacro(writer, sr.toString());
+ }
+
+ public void renderPortalPagePortletBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ String portalPortletId = portalPortlet.getString("portalPortletId");
+ String screenName = portalPortlet.getString("screenName");
+ String screenLocation = portalPortlet.getString("screenLocation");
+
+ ModelScreen modelScreen = null;
+ if (UtilValidate.isNotEmpty(screenName) && UtilValidate.isNotEmpty(screenLocation)) {
+ try {
+ modelScreen = ScreenFactory.getScreenFromLocation(screenLocation, screenName);
+ } catch (IOException e) {
+ String errMsg = "Error rendering portlet ID [" + portalPortletId + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ throw new RuntimeException(errMsg);
+ } catch (SAXException e) {
+ String errMsg = "Error rendering portlet ID [" + portalPortletId + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ throw new RuntimeException(errMsg);
+ } catch (ParserConfigurationException e) {
+ String errMsg = "Error rendering portlet ID [" + portalPortletId + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ throw new RuntimeException(errMsg);
+ }
+ }
+ modelScreen.renderScreenString(writer, context, this);
+ }
}
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Tue Sep 21 11:36:01 2010
@@ -23,6 +23,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.ListIterator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -61,6 +62,7 @@ import org.ofbiz.widget.tree.TreeFactory
import org.ofbiz.widget.tree.TreeStringRenderer;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
+import org.ofbiz.entity.condition.*;
/**
@@ -1579,18 +1581,117 @@ public abstract class ModelScreenWidget
return "<image id=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\" src=\"" + this.srcExdr.getOriginal() + "\" url-mode=\"" + this.urlMode + "\"/>";
}
}
-}
-
-
-
-
-
-
-
+ public static class PortalPage extends ModelScreenWidget {
+ public static final String TAG_NAME = "include-portal-page";
+ protected FlexibleStringExpander idExdr;
+ protected FlexibleStringExpander editModeExdr;
+ protected String originalPortalPageId;
+ public PortalPage(ModelScreen modelScreen, Element portalPageElement) {
+ super(modelScreen, portalPageElement);
+ this.idExdr = FlexibleStringExpander.getInstance(portalPageElement.getAttribute("id"));
+ this.editModeExdr = FlexibleStringExpander.getInstance(portalPageElement.getAttribute("edit-mode"));
+ }
+ @Override
+ public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
+ try {
+ Delegator delegator = (Delegator) context.get("delegator");
+ GenericValue portalPage = null;
+ List<GenericValue> portalPageColumns = null;
+ List<GenericValue> portalPagePortlets = null;
+ List<GenericValue> portletAttributes = null;
+
+ String expandedPortalPageId = getId(context);
+
+ if (UtilValidate.isNotEmpty(expandedPortalPageId)) {
+ portalPage = delegator.findByPrimaryKeyCache("PortalPage", UtilMisc.toMap("portalPageId", expandedPortalPageId));
+ if (portalPage == null) {
+ String errMsg = "Could not find PortalPage with portalPageId [" + expandedPortalPageId + "] ";
+ Debug.logError(errMsg, module);
+ throw new RuntimeException(errMsg);
+ } else {
+ originalPortalPageId = portalPage.getString("originalPortalPageId");
+ portalPageColumns = delegator.getRelatedCache("PortalPageColumn", portalPage);
+ portalPagePortlets = delegator.findByAndCache("PortalPagePortletView", UtilMisc.toMap("portalPageId", expandedPortalPageId), UtilMisc.toList("sequenceNum"));
+ }
+ } else {
+ String errMsg = "portalPageId is empty.";
+ Debug.logError(errMsg, module);
+ return;
+ }
+ // Renders the portalPage header
+ screenStringRenderer.renderPortalPageBegin(writer, context, this);
+
+ ListIterator <GenericValue>columnsIterator = portalPageColumns.listIterator();
+ while(columnsIterator.hasNext()) {
+ GenericValue columnValue = columnsIterator.next();
+
+ // Renders the portalPageColumn header
+ screenStringRenderer.renderPortalPageColumnBegin(writer, context, this, columnValue);
+
+ ListIterator <GenericValue>portletsIterator = portalPagePortlets.listIterator();
+ while(portletsIterator.hasNext()) {
+ GenericValue portletValue = portletsIterator.next();
+
+ String portletColumnSeqId = portletValue.getString("columnSeqId");
+ String columnSeqId = columnValue.getString("columnSeqId");
+
+ if ((columnSeqId != null) && (portletColumnSeqId != null)) {
+ if (columnSeqId.equals(portletColumnSeqId)) {
+ // Retrieves portlet's attributes
+ portletAttributes = delegator.findList("PortletAttribute",
+ EntityCondition.makeCondition(UtilMisc.toMap("portalPageId", portletValue.get("portalPageId"), "portalPortletId", portletValue.get("portalPortletId"), "portletSeqId", portletValue.get("portletSeqId"))),
+ null, null, null, false);
+
+
+ ListIterator <GenericValue>attributesIterator = portletAttributes.listIterator();
+
+ while (attributesIterator.hasNext()) {
+ GenericValue attribute = attributesIterator.next();
+ context.put(attribute.getString("attrName"), attribute.getString("attrValue"));
+ }
+
+ // Renders the portalPagePortlet
+ screenStringRenderer.renderPortalPagePortletBegin(writer, context, this, portletValue);
+ screenStringRenderer.renderPortalPagePortletBody(writer, context, this, portletValue);
+ screenStringRenderer.renderPortalPagePortletEnd(writer, context, this, portletValue);
+ }
+ }
+ }
+ // Renders the portalPageColumn footer
+ screenStringRenderer.renderPortalPageColumnEnd(writer, context, this, columnValue);
+ }
+ // Renders the portalPage footer
+ screenStringRenderer.renderPortalPageEnd(writer, context, this);
+ } catch (IOException e) {
+ String errMsg = "Error rendering PortalPage with portalPageId [" + getId(context) + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ throw new RuntimeException(errMsg);
+ } catch (GenericEntityException e) {
+ String errMsg = "Error obtaining PortalPage with portalPageId [" + getId(context) + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ throw new RuntimeException(errMsg);
+ }
+ }
+ public String getId(Map<String, Object> context) {
+ return this.idExdr.expandString(context);
+ }
+ public String getOriginalPortalPageId() {
+ return this.originalPortalPageId;
+ }
+
+ public String getEditMode(Map<String, Object> context) {
+ return this.editModeExdr.expandString(context);
+ }
+ @Override
+ public String rawString() {
+ return "<include-portal-page id=\"" + this.idExdr.getOriginal() + "\" name=\"" + this.idExdr.getOriginal() + "\">";
+ }
+ }
+}
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java Tue Sep 21 11:36:01 2010
@@ -20,6 +20,7 @@ package org.ofbiz.widget.screen;
import java.io.IOException;
import java.util.Map;
+import org.ofbiz.entity.GenericValue;
import org.ofbiz.base.util.GeneralException;
@@ -50,6 +51,14 @@ public interface ScreenStringRenderer {
public void renderScreenletBegin(Appendable writer, Map<String, Object> context, boolean collapsed, ModelScreenWidget.Screenlet screenlet) throws IOException;
public void renderScreenletSubWidget(Appendable writer, Map<String, Object> context, ModelScreenWidget subWidget, ModelScreenWidget.Screenlet screenlet) throws GeneralException, IOException;
public void renderScreenletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.Screenlet screenlet) throws IOException;
+
+ public void renderPortalPageBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException;
+ public void renderPortalPageEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException;
+ public void renderPortalPageColumnBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException;
+ public void renderPortalPageColumnEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException;
+ public void renderPortalPagePortletBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException;
+ public void renderPortalPagePortletBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException;
+ public void renderPortalPagePortletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException;
}
Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java Tue Sep 21 11:36:01 2010
@@ -25,6 +25,7 @@ import org.ofbiz.base.util.GeneralExcept
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.widget.screen.ModelScreenWidget;
import org.ofbiz.widget.screen.ScreenStringRenderer;
+import org.ofbiz.entity.GenericValue;
/**
* Widget Library - Text Screen Renderer implementation
@@ -121,4 +122,25 @@ public class TextScreenRenderer implemen
public void renderScreenletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.Screenlet screenlet) throws IOException {
// TODO: not implemented
}
+ public void renderPortalPageBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPageColumnEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPageColumn) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBegin(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletEnd(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
+ public void renderPortalPagePortletBody(Appendable writer, Map<String, Object> context, ModelScreenWidget.PortalPage portalPage, GenericValue portalPortlet) throws GeneralException, IOException {
+ // TODO: not implemented
+ }
}
Modified: ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl Tue Sep 21 11:36:01 2010
@@ -512,7 +512,7 @@ ${item.description}</span>
<#macro renderFileField className alert name value size maxlength autocomplete><input type="file" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/></#macro>
<#macro renderPasswordField className alert name value size maxlength id autocomplete><input type="password" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/></#macro>
-<#macro renderImageField value description alternate border width height event action><img<#if value?has_content> src="${value}"</#if><#if description?has_content> title="${description}"</#if> alt="<#if alternate?has_content>${alternate}"</#if>"<#if border?has_content> border="${border}"</#if><#if width?has_content> width="${width}"</#if><#if height?has_content> height="${height}"</#if><#if event?has_content> ${rp.event?html}="${action}" </#if>/></#macro>
+<#macro renderImageField value description alternate border width height event action><img<#if value?has_content> src="${value}"</#if><#if description?has_content> title="${description}"</#if> alt="<#if alternate?has_content>${alternate}"</#if>"<#if border?has_content> border="${border}"</#if><#if width?has_content> width="${width}"</#if><#if height?has_content> height="${height}"</#if><#if event?has_content> ${event?html}="${action}" </#if>/></#macro>
<#macro renderBanner style leftStyle rightStyle leftText text rightText>
<table width="100%"> <tr><#rt/>
Modified: ofbiz/branches/jquery/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/htmlScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/jquery/framework/widget/templates/htmlScreenMacroLibrary.ftl Tue Sep 21 11:36:01 2010
@@ -158,3 +158,95 @@ ${menuString}
<li class="${paginatePreviousStyle?default("nav-previous")}<#if !previousLinkUrl?has_content> disabled</#if>"><#if previousLinkUrl?has_content><a href="${previousLinkUrl}">${paginatePreviousLabel}</a><#else>${paginatePreviousLabel}</#if></li>
<li class="${paginateFirstStyle?default("nav-first")}<#if !firstLinkUrl?has_content> disabled</#if>"><#if firstLinkUrl?has_content><a href="${firstLinkUrl}">${paginateFirstLabel}</a><#else>${paginateFirstLabel}</#if></li>
</#macro>
+
+<#macro renderPortalPageBegin originalPortalPageId portalPageId editMode="false" addColumnLabel="Add column" addColumnHint="Add a new column to this portal">
+ <#if editMode == "true">
+ <script src="/images/myportal.js" type="text/javascript"></script>
+ <a class="buttontext" href="javascript:document.addColumn_${portalPageId}.submit()" title="${addColumnHint}">${addColumnLabel}</a> PortalPageId: ${portalPageId}
+ <form method="post" action="addPortalPageColumn" name="addColumn_${portalPageId}">
+ <input name="portalPageId" value="${portalPageId}" type="hidden"/>
+ </form>
+ </#if>
+ <table width="100%">
+ <tr>
+</#macro>
+
+<#macro renderPortalPageEnd editMode="false" editOnURL="#" editOffURL="#" editOnLabel="Edit ON" editOffLabel="Edit OFF" editOnHint="Enable portal page editing" editOffHint="Disable portal page editing">
+ </tr>
+ </table>
+ <#if editMode == "true">
+ <a class="buttontext" href="${editOffURL}" title="${editOffHint}">${editOffLabel}</a>
+ <#else>
+ <a class="buttontext" href="${editOnURL}" title="${editOnHint}">${editOnLabel}</a>
+ </#if>
+</#macro>
+
+<#macro renderPortalPageColumnBegin originalPortalPageId portalPageId columnSeqId editMode="false" width="auto" delColumnLabel="Remove column" delColumnHint="Delete this column" addPortletLabel="Add portlet" addPortletHint="Add a new portlet to this column" setColumnSizeHint="Set column size">
+ <#assign columnKey = portalPageId+columnSeqId>
+ <#assign columnKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="columnSeqId" value="' + columnSeqId + '" type="hidden"/>'>
+ <td style="vertical-align: top; <#if width?has_content> width:${width};</#if>" id="portalColumn_${columnSeqId}">
+ <#if editMode == "true">
+ <div class="portal-column-config-title-bar">
+ <ul>
+ <li>
+ <form method="post" action="deletePortalPageColumn" name="delColumn_${columnKey}">
+ ${columnKeyFields}
+ </form>
+ <a class="buttontext" href="javascript:document.delColumn_${columnKey}.submit()" title="${delColumnHint}">${delColumnLabel}</a>
+ </li>
+ <li>
+ <form method="post" action="addPortlet" name="addPortlet_${columnKey}">
+ ${columnKeyFields}
+ </form>
+ <a class="buttontext" href="javascript:document.addPortlet_${columnKey}.submit()" title="${addPortletHint}">${addPortletLabel}</a>
+ </li>
+ <li>
+ <form method="post" action="editPortalPageColumnWidth" name="setColumnSize_${columnKey}">
+ ${columnKeyFields}
+ </form>
+ <a class="buttontext" href="javascript:document.setColumnSize_${columnKey}.submit()" title="${setColumnSizeHint}">${width}</a>
+ </li>
+ </ul>
+ </div>
+ </#if>
+</#macro>
+
+<#macro renderPortalPageColumnEnd>
+ </td>
+</#macro>
+
+<#macro renderPortalPagePortletBegin originalPortalPageId portalPageId portalPortletId portletSeqId editMode="false" delPortletHint="Remove this portlet" editAttribute="false" editAttributeHint="Edit portlet parameters">
+ <#assign portletKey = portalPageId+portalPortletId+portletSeqId>
+ <#assign portletKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="portalPortletId" value="' + portalPortletId + '" type="hidden"/><input name="portletSeqId" value="' + portletSeqId + '" type="hidden"/>'>
+ <div id="PP_${portletKey}" name="portalPortlet" class="noClass">
+ <#if editMode == "true">
+ <div class="portlet-config" id="PPCFG_${portletKey}">
+ <div class="portlet-config-title-bar">
+ <ul>
+ <li class="title">Portlet : [${portalPortletId}]</li>
+ <li class="remove">
+ <form method="post" action="deletePortalPagePortlet" name="delPortlet_${portletKey}">
+ ${portletKeyFields}
+ </form>
+ <a href="javascript:document.delPortlet_${portletKey}.submit()" title="${delPortletHint}"> </a>
+ </li>
+ <#if editAttribute == "true">
+ <li class="edit">
+ <form method="post" action="editPortalPortletAttributes" name="editPortlet_${portletKey}">
+ ${portletKeyFields}
+ </form>
+ <a href="javascript:document.editPortlet_${portletKey}.submit()" title="${editAttributeHint}"> </a>
+ </li>
+ </#if>
+ </ul>
+ <br class="clear"/>
+ </div>
+ </#if>
+</#macro>
+
+<#macro renderPortalPagePortletEnd editMode="false">
+ </div>
+ <#if editMode == "true">
+ </div>
+ </#if>
+</#macro>
Modified: ofbiz/branches/jquery/macros.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/macros.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/macros.xml (original)
+++ ofbiz/branches/jquery/macros.xml Tue Sep 21 11:36:01 2010
@@ -52,6 +52,9 @@ under the License.
<pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-3.2.jar"/>
<pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/groovy-all-1.7.4.jar"/>
</path>
+ <path id="rhino.class.path">
+ <pathelement location="${ofbiz.home.dir}/extension/rhino/lib/js-1.7.R1.jar"/>
+ </path>
<path id="ant.lib.class.path">
<pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-nodeps-1.7.1.jar"/>
</path>
@@ -152,6 +155,12 @@ under the License.
</groovyc>
</presetdef>
+ <scriptdef name="if" language="javascript" classpathref="rhino.class.path" loaderref="rhino.class.path.loader" src="${ofbiz.home.dir}/tools/If-ant.py">
+ <element name="condition" classname="org.apache.tools.ant.taskdefs.condition.And"/>
+ <element name="commands" classname="org.apache.tools.ant.taskdefs.Sequential"/>
+ <element name="else" classname="org.apache.tools.ant.taskdefs.Sequential"/>
+ </scriptdef>
+
<taskdef name="javacc" classname="org.apache.tools.ant.taskdefs.optional.javacc.JavaCC" classpath="${ofbiz.home.dir}/framework/base/lib/ant/ant-nodeps-1.7.1.jar"/>
<taskdef name="jjtree" classname="org.apache.tools.ant.taskdefs.optional.javacc.JJTree" classpath="${ofbiz.home.dir}/framework/base/lib/ant/ant-nodeps-1.7.1.jar"/>
<macrodef name="ofbiz-javacc">
@@ -160,11 +169,13 @@ under the License.
<attribute name="prefix" default=""/>
<sequential>
<if>
- <not>
- <uptodate
- srcfile="@{prefix}src/@{dir}/@{file}.jj"
- targetfile="@{prefix}build/gen-src/javacc/@{dir}/@{file}.java"/>
- </not>
+ <condition>
+ <not>
+ <uptodate
+ srcfile="@{prefix}src/@{dir}/@{file}.jj"
+ targetfile="@{prefix}build/gen-src/javacc/@{dir}/@{file}.java"/>
+ </not>
+ </condition>
<commands>
<delete dir="@{prefix}build/gen-src/javacc/@{dir}"/>
<mkdir dir="@{prefix}build/gen-src/javacc/@{dir}"/>
@@ -183,11 +194,13 @@ under the License.
<attribute name="prefix" default=""/>
<sequential>
<if>
- <not>
- <uptodate
- srcfile="@{prefix}src/@{dir}/@{file}.jjt"
- targetfile="@{prefix}build/gen-src/jjtree/@{dir}/@{file}.jj"/>
- </not>
+ <condition>
+ <not>
+ <uptodate
+ srcfile="@{prefix}src/@{dir}/@{file}.jjt"
+ targetfile="@{prefix}build/gen-src/jjtree/@{dir}/@{file}.jj"/>
+ </not>
+ </condition>
<commands>
<delete dir="@{prefix}build/gen-src/jjtree/@{dir}"/>
<mkdir dir="@{prefix}build/gen-src/jjtree/@{dir}"/>
@@ -197,11 +210,13 @@ under the License.
</commands>
</if>
<if>
- <not>
- <uptodate
- srcfile="@{prefix}build/gen-src/jjtree/@{dir}/@{file}.jj"
- targetfile="@{prefix}build/gen-src/javacc/@{dir}/@{file}.java"/>
- </not>
+ <condition>
+ <not>
+ <uptodate
+ srcfile="@{prefix}build/gen-src/jjtree/@{dir}/@{file}.jj"
+ targetfile="@{prefix}build/gen-src/javacc/@{dir}/@{file}.java"/>
+ </not>
+ </condition>
<commands>
<delete dir="@{prefix}build/gen-src/javacc/@{dir}"/>
<mkdir dir="@{prefix}build/gen-src/javacc/@{dir}"/>
Propchange: ofbiz/branches/jquery/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 11:36:01 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt/specialpurpose/ebay/lib:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310/specialpurpose/ebaystore/lib:921280-927264
-/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-996840
+/ofbiz/trunk/specialpurpose/ebaystore/lib:951708-999128
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/catalog/configproductdetail.ftl Tue Sep 21 11:36:01 2010
@@ -138,7 +138,7 @@ ${virtualJavaScript?if_exists}
<script language="JavaScript" type="text/javascript">
<!--
-Event.observe(window, 'load', function() {
+document.observe('dom:loaded', function() {
Event.observe($('configFormId'),'change',getConfigDetails);
});
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/checkoutProcess.js Tue Sep 21 11:36:01 2010
@@ -21,7 +21,7 @@ var isShipStepValidate = false;
var isShipOptionStepValidate = false;
var isBillStepValidate = false;
-Event.observe(window, 'load', function() {
+document.observe('dom:loaded', function() {
// Cart
var validateCart = new Validation('cartForm', {immediate: true, onSubmit: false});
var validateShip = new Validation('shippingForm', {immediate: true, onSubmit: false});
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/productAdditionalView.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/productAdditionalView.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/productAdditionalView.js (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/productAdditionalView.js Tue Sep 21 11:36:01 2010
@@ -53,4 +53,4 @@ imgView = {
}
}
}
-Event.observe(window, 'load', imgView.init, false);
+document.observe('dom:loaded', imgView.init, false);
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js Tue Sep 21 11:36:01 2010
@@ -20,7 +20,7 @@ under the License.
var validateNewUser = null;
var validateEditUser = null;
var validatePostalAddress = null;
-Event.observe(window, 'load', function() {
+document.observe('dom:loaded', function() {
if ($('newUserForm')) {
validateNewUser = new Validation('newUserForm', {immediate: true, onSubmit: false});
addValidations();
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js (original)
+++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js Tue Sep 21 11:36:01 2010
@@ -17,13 +17,13 @@ specific language governing permissions
under the License.
*/
-Event.observe(window, 'load', isValidElement);
+document.observe('dom:loaded', isValidElement);
function isValidElement(element){
var validator = new Validation('quickAnonProcessCustomer', {immediate : true});
}
-Event.observe(window, 'load', function() {
+document.observe('dom:loaded', function() {
Event.observe('useShippingPostalAddressForBilling', 'click', changeText2);
});
function changeText2(){
Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 11:36:01 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-996840
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy:951708-999128
Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 11:36:01 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-996840
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy:951708-999128
Propchange: ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 11:36:01 2010
@@ -1,3 +1,3 @@
/incubator/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:418499-490456
/ofbiz/branches/multitenant20100310/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:921280-927264
-/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-996840
+/ofbiz/trunk/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy:951708-999128
Modified: ofbiz/branches/jquery/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml?rev=999327&r1=999326&r2=999327&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/projectmgr/config/ProjectMgrUiLabels.xml Tue Sep 21 11:36:01 2010
@@ -289,7 +289,7 @@
<value xml:lang="en">Add Sub Task</value>
<value xml:lang="fr">Ajouter une sous-tâche</value>
<value xml:lang="it">Aggiungi sotto-compito</value>
- <value xml:lang="nl">Add Sub Task</value>
+ <value xml:lang="nl">Subtaak toevoegen</value>
<value xml:lang="th">à¹à¸à¸´à¹à¸¡à¸à¸²à¸à¸¢à¹à¸à¸¢</value>
<value xml:lang="zh">å¢å åä»»å¡</value>
</property>
@@ -1041,7 +1041,7 @@
<value xml:lang="en">Fri</value>
<value xml:lang="fr">ven</value>
<value xml:lang="it">Ven</value>
- <value xml:lang="nl">Vrij</value>
+ <value xml:lang="nl">Vr</value>
<value xml:lang="zh">å¨äº</value>
</property>
<property key="ProjectMgrGanttChart">
@@ -1080,7 +1080,7 @@
<value xml:lang="en">Mon</value>
<value xml:lang="fr">lun</value>
<value xml:lang="it">Lun</value>
- <value xml:lang="nl">Maa</value>
+ <value xml:lang="nl">Ma</value>
<value xml:lang="zh">å¨ä¸</value>
</property>
<property key="ProjectMgrMyRoleForThisTask">
@@ -1482,7 +1482,7 @@
<value xml:lang="en">Sat</value>
<value xml:lang="fr">sam</value>
<value xml:lang="it">Sab</value>
- <value xml:lang="nl">Zat</value>
+ <value xml:lang="nl">Za</value>
<value xml:lang="zh">å¨å
</value>
</property>
<property key="ProjectMgrSaveAsTemplate">
@@ -1632,7 +1632,7 @@
<value xml:lang="en">Sun</value>
<value xml:lang="fr">dim</value>
<value xml:lang="it">Dom</value>
- <value xml:lang="nl">Zon</value>
+ <value xml:lang="nl">Zo</value>
<value xml:lang="zh">卿¥</value>
</property>
<property key="ProjectMgrTaskContentList">