svn commit: r789025 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml data/WorkEffortPortletData.xml widget/CalendarForms.xml widget/CalendarScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r789025 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml data/WorkEffortPortletData.xml widget/CalendarForms.xml widget/CalendarScreens.xml

buscob
Author: buscob
Date: Sat Jun 27 22:54:50 2009
New Revision: 789025

URL: http://svn.apache.org/viewvc?rev=789025&view=rev
Log:
Added an edit form for the Calendar portlet so that the initial view mode can be chosen by the user.

Added:
    ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml
Modified:
    ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
    ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml
    ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml

Modified: ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml?rev=789025&r1=789024&r2=789025&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml (original)
+++ ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml Sat Jun 27 22:54:50 2009
@@ -167,6 +167,10 @@
         <value xml:lang="th">ข้อมูล Url</value>
         <value xml:lang="zh">信息链接</value>
     </property>
+    <property key="FormFieldTitle_initialView">
+        <value xml:lang="en">Initial View</value>
+        <value xml:lang="it">Vista iniziale</value>
+    </property>
     <property key="FormFieldTitle_invoiceInfo">
         <value xml:lang="en">Invoice Info</value>
         <value xml:lang="fr">Information de facture</value>

Modified: ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml?rev=789025&r1=789024&r2=789025&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml (original)
+++ ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml Sat Jun 27 22:54:50 2009
@@ -32,6 +32,8 @@
         screenName="Calendar"
         screenLocation="component://workeffort/widget/CalendarScreens.xml"
         description="My Calendar"
+        editFormName="EditCalendar"
+        editFormLocation="component://workeffort/widget/CalendarForms.xml"
         screenshot="/images/portlets/Calendar.png"/>
     <PortletPortletCategory portalPortletId="Calendar" portletCategoryId="EVENTSTASKS"/>
     

Added: ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml?rev=789025&view=auto
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml (added)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml Sat Jun 27 22:54:50 2009
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+    <!-- Forms Specific to portlet -->
+    <form name="EditCalendar" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
+        <field name="initialView" entry-name="attributeMap.initialView">
+            <drop-down>
+                <option key="day" description="${uiLabelMap.WorkEffortDayView}"/>
+                <option key="week" description="${uiLabelMap.WorkEffortWeekView}"/>
+                <option key="month" description="${uiLabelMap.WorkEffortMonthView}"/>
+            </drop-down>
+        </field>
+        <field name="updateButton"><submit/></field>
+    </form>
+</forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml?rev=789025&r1=789024&r2=789025&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/CalendarScreens.xml Sat Jun 27 22:54:50 2009
@@ -25,6 +25,8 @@
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleCalendar"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
+                <set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
             </actions>
             <widgets>
                 <section>