Author: hansbak
Date: Tue May 27 00:30:18 2008 New Revision: 660414 URL: http://svn.apache.org/viewvc?rev=660414&view=rev Log: contribution of Ravindra Mandre Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/opportunity/OpportunityServices.xml ofbiz/trunk/applications/marketing/servicedef/services.xml ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original) +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Tue May 27 00:30:18 2008 @@ -1236,9 +1236,6 @@ <property key="SfaMergeLeads"> <value xml:lang="en">Merge Leads</value> </property> - <property key="SfaNewOpportunity"> - <value xml:lang="en">Create New Opportunity</value> - </property> <property key="SfaNextStep"> <value xml:lang="en">Next Step</value> </property> Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/opportunity/OpportunityServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/opportunity/OpportunityServices.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/opportunity/OpportunityServices.xml (original) +++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/opportunity/OpportunityServices.xml Tue May 27 00:30:18 2008 @@ -29,6 +29,7 @@ <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> <set from-field="userLogin.userLoginId" field="newEntity.createdByUserLogin"/> + <field-to-result field-name="parameters.salesOpportunityId" result-name="salesOpportunityId"/> <create-value value-name="newEntity"/> </simple-method> <simple-method method-name="updateOpportunity" short-description="Update an opportunity"> Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/servicedef/services.xml (original) +++ ofbiz/trunk/applications/marketing/servicedef/services.xml Tue May 27 00:30:18 2008 @@ -372,11 +372,10 @@ <service name="createOpportunity" engine="simple" default-entity-name="SalesOpportunity" location="org/ofbiz/sfa/opportunity/OpportunityServices.xml" invoke="createOpportunity"> <description>Create an opportunity</description> - <auto-attributes mode="IN" include="pk" optional="false"></auto-attributes> + <auto-attributes mode="OUT" include="pk" optional="false"/> <auto-attributes mode="IN" include="nonpk" optional="true"> <exclude field-name="createdByUserLogin"/> </auto-attributes> - <override name="salesOpportunityId" mode="IN" optional="true"/> </service> <service name="updateOpportunity" engine="simple" default-entity-name="SalesOpportunity" location="org/ofbiz/sfa/opportunity/OpportunityServices.xml" invoke="updateOpportunity"> Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Tue May 27 00:30:18 2008 @@ -36,10 +36,6 @@ <response name="success" type="view" value="FindOpportunity"/> <response name="error" type="view" value="FindOpportunity"/> </request-map> - <request-map uri="NewOpportunity"> - <security https="true" auth="true"/> - <response name="success" type="view" value="NewOpportunity"></response> - </request-map> <request-map uri="viewOpportunity"> <security https="true" auth="true"/> <response name="success" type="view" value="viewOpportunity"/> @@ -48,7 +44,7 @@ <security https="true" auth="true"/> <event type="service" invoke="createOpportunity"/> <response name="success" type="view" value="viewOpportunity"/> - <response name="error" type="view" value="NewOpportunity"/> + <response name="error" type="view" value="EditOpportunity"/> </request-map> <request-map uri="EditOpportunity"> <security https="true" auth="true"/> @@ -190,7 +186,6 @@ <view-map name="viewprofile" type="screen" page="component://marketing/widget/sfa/CommonScreens.xml#ViewProfile"/> <view-map name="FindOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#FindOpportunity"/> - <view-map name="NewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#NewOpportunity"/> <view-map name="viewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#viewOpportunity"/> <view-map name="EditOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#EditOpportunity"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/OpportunityScreens.xml Tue May 27 00:30:18 2008 @@ -40,7 +40,7 @@ <container style="screenlet-body"> <section> <widgets> - <container><link target="NewOpportunity" text="${uiLabelMap.CommonCreateNew}" style="buttontext"/></container> + <container><link target="EditOpportunity" text="${uiLabelMap.CommonCreateNew}" style="buttontext"/></container> <include-form name="FindOpportunity" location="component://marketing/widget/sfa/forms/OpportunityForms.xml"/> </widgets> </section> @@ -68,7 +68,7 @@ </section> </screen> - <screen name="NewOpportunity"> + <screen name="EditOpportunity"> <section> <actions> <entity-one entity-name="SalesOpportunity" value-name="salesOpportunity"/> @@ -80,13 +80,13 @@ <container style="screenlet"> <container style="screenlet-title-bar"> <container style="h3"> - <label text="${uiLabelMap.SfaNewOpportunity}"/> + <label text="${uiLabelMap.SfaEditOpportunity}"/> </container> </container> <container style="screenlet-body"> <section> <widgets> - <include-form name="NewOpportunity" location="component://marketing/widget/sfa/forms/OpportunityForms.xml"/> + <include-form name="EditOpportunity" location="component://marketing/widget/sfa/forms/OpportunityForms.xml"/> </widgets> </section> </container> @@ -127,35 +127,4 @@ </widgets> </section> </screen> - - <screen name="EditOpportunity"> - <section> - <actions> - <entity-one entity-name="SalesOpportunity" value-name="salesOpportunity"></entity-one> - <set field="titleProperty" value="Opportunities"/> - <set field="tabButtonItem" value="editOpportunity"/> - <set field="salesOpportunityId" from-field="parameters.salesOpportunityId"/> - </actions> - <widgets> - <decorator-screen name="CommonOpportunityDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.SfaEditOpportunity}"/> - </container> - </container> - <container style="screenlet-body"> - <section> - <widgets> - <include-form name="EditOpportunity" location="component://marketing/widget/sfa/forms/OpportunityForms.xml"/> - </widgets> - </section> - </container> - </container> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> </screens> \ No newline at end of file Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml?rev=660414&r1=660413&r2=660414&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/OpportunityForms.xml Tue May 27 00:30:18 2008 @@ -64,9 +64,14 @@ </field> </form> - <form name="NewOpportunity" type="single" target="createOpportunity" + <form name="EditOpportunity" type="single" target="createOpportunity" default-map-name="salesOpportunity" header-row-style="header-row" default-table-style="basic-table"> - <field name="opportunityName" position="1" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="25"></text></field> + <alt-target use-when="salesOpportunity!=null" target="updateOpportunity"/> + <field name="salesOpportunityId" use-when="salesOpportunity!=null"><display/></field> + <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="30"/></field> + <field name="initialAccount" title="${uiLabelMap.SfaInitialAccount}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field> + <field name="typeEnumId" title="${uiLabelMap.SfaType}"></field> + <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text size="25"></text></field> <field name="initialAccount" position="1" title="${uiLabelMap.SfaInitialAccount}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field> <field name="typeEnumId" position="1" title="${uiLabelMap.SfaType}"> <drop-down allow-empty="true"> @@ -76,7 +81,7 @@ </entity-options> </drop-down> </field> - <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount}"><text size="25"></text></field> + <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount}"><text size="25"/></field> <field name="currencyUomId" position="2" title="${uiLabelMap.CommonCurrency}"> <drop-down allow-empty="true" no-current-selected-key="${defaultCurrencyUomId}"> <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom"> @@ -92,7 +97,7 @@ </entity-options> </drop-down> </field> - <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><text size="25"></text></field> + <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><text size="25"/></field> <field name="dataSourceId" position="2" title="${uiLabelMap.DataSourceLabel}"> <drop-down allow-empty="true"> <entity-options key-field-name="dataSourceId" description="${description}" entity-name="DataSource"> @@ -106,9 +111,10 @@ </entity-options> </drop-down> </field> - <field name="description" position="1" title="${uiLabelMap.SegmentGroupDescription}"><textarea/></field> - <field name="nextStep" position="1" title="${uiLabelMap.SfaNextStep}"><textarea/></field> - <field name="createButton" widget-style="smallSubmit" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field> + <field name="description" title="${uiLabelMap.SegmentGroupDescription}"><textarea/></field> + <field name="nextStep" title="${uiLabelMap.SfaNextStep}"><textarea/></field> + <field name="submitButton" title="${uiLabelMap.CommonSave}" use-when="salesOpportunity==null"><submit button-type="button"/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" use-when="salesOpportunity!=null"><submit button-type="button"/></field> </form> <form name="ViewOpportunity" type="single" default-map-name="salesOpportunity" @@ -126,50 +132,4 @@ <field name="description" position="1" title="${uiLabelMap.SegmentGroupDescription}"><display/></field> <field name="nextStep" position="1" title="${uiLabelMap.SfaNextStep}"><display/></field> </form> - <form name="EditOpportunity" type="single" target="updateOpportunity" default-map-name="salesOpportunity" header-row-style="header-row" default-table-style="basic-table"> - <field name="salesOpportunityId" position="1" title="${uiLabelMap.SfaOpportunityId}"><display/></field> - <field name="opportunityName" position="1" title="${uiLabelMap.SfaOpportunityName}" widget-style="required"><text/></field> - <field name="initialAccount" position="1" title="${uiLabelMap.SfaInitialAccount}" widget-style="required"><lookup target-form-name="LookupPartyName"/></field> - <field name="typeEnumId" position="1" title="${uiLabelMap.SfaType}"> - <drop-down allow-empty="true"> - <entity-options key-field-name="enumId" description="${description}" entity-name="Enumeration"> - <entity-constraint name="enumTypeId" operator="equals" value="SLSOPP_TYP_ENUM"/> - <entity-order-by field-name="sequenceId"/> - </entity-options> - </drop-down> - </field> - <field name="estimatedAmount" position="1" title="${uiLabelMap.SfaEstimatedAmount}"><text/></field> - <field name="currencyUomId" position="2" title="${uiLabelMap.CommonCurrency}"> - <drop-down allow-empty="true" no-current-selected-key="${defaultCurrencyUomId}"> - <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom"> - <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/> - <entity-order-by field-name="abbreviation"/> - </entity-options> - </drop-down> - </field> - <field name="estimatedCloseDate" position="1" title="${uiLabelMap.SfaCloseDate}" widget-style="required"><date-time/></field> - <field name="opportunityStageId" position="2" title="${uiLabelMap.SfaInitialStage}" widget-style="required"> - <drop-down > - <entity-options description="${description}" entity-name="SalesOpportunityStage"> - </entity-options> - </drop-down> - </field> - <field name="estimatedProbability" position="1" title="${uiLabelMap.SfaProbability}"><text/></field> - <field name="dataSourceId" position="2" title="${uiLabelMap.DataSourceLabel}"> - <drop-down allow-empty="true"> - <entity-options key-field-name="dataSourceId" description="${description}" entity-name="DataSource"> - <entity-constraint name="dataSourceTypeId" operator="equals" value="SLSOPP_SRC"/> - </entity-options> - </drop-down> - </field> - <field name="marketingCampaignId" position="1" title="${uiLabelMap.MarketingCampaign}"> - <drop-down allow-empty="true"> - <entity-options description="${campaignName}" entity-name="MarketingCampaign" key-field-name="marketingCampaignId"> - </entity-options> - </drop-down> - </field> - <field name="description" position="1" title="${uiLabelMap.SegmentGroupDescription}"><textarea/></field> - <field name="nextStep" position="1" title="${uiLabelMap.SfaNextStep}"><textarea/></field> - <field name="createButton" widget-style="smallSubmit" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field> - </form> </forms> \ No newline at end of file |
Free forum by Nabble | Edit this page |