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/24 14:47:15 UTC
svn commit: r1000847 - in /ofbiz/branches/jquery:
applications/accounting/widget/ap/ framework/common/script/org/ofbiz/common/
framework/common/webcommon/includes/ framework/webtools/config/
framework/webtools/widget/
Author: jleroux
Date: Fri Sep 24 12:47:15 2010
New Revision: 1000847
URL: http://svn.apache.org/viewvc?rev=1000847&view=rev
Log:
Accounting/Commission Run screen
* Uses asmselect
Webtoos/Geo Management/Link Zones screens
* Shows "geoName (geoid)" entries in dropdowns, and sort them by geoId instead of GeoName
Accounting/Commission Run and Webtoos/Geo Management/Link Zones screens
* Uses the new asm_ prefix for asm vars (to prevent names collisions)
* Uses the new title attribute
* Enlarges the sub-form (grayed background)
Modified:
ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml
ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml
ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml
ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml
Modified: ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml (original)
+++ ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml Fri Sep 24 12:47:15 2010
@@ -167,10 +167,20 @@ under the License.
<set field="tabButtonItem" value="commissionRun"/>
<set field="salesRepPartyList" type="List" from-field="parameters.partyIds"/>
<script location="component://accounting/webapp/ap/WEB-INF/actions/invoices/CommissionRun.groovy"/>
+
+ <!-- asmslect parameters, must be prefixed by asm_ -->
+ <set field="asm_multipleSelectForm" value="CommissionRun"/>
+ <set field="asm_multipleSelect" value="CommissionRun_partyId"/>
+ <set field="asm_formSize" value="700"/>
+ <set field="asm_listItemPercentOfForm" value="95"/>
+ <set field="asm_sortable" value="false"/>
+ <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+ <set field="asm_title" value="${uiLabelMap.AccountingSelectPartiesForCommissionInvoice}"/>
</actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="body">
+ <decorator-section name="body">
+ <platform-specific><html><html-template location="component://common/webcommon/includes/setMultipleSelectJs.ftl"/></html></platform-specific>
<section>
<widgets>
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
Modified: ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml (original)
+++ ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml Fri Sep 24 12:47:15 2010
@@ -314,13 +314,14 @@ under the License.
<field-map field-name="geoIdTo" from-field="parameters.geoId"/>
<field-map field-name="geoAssocTypeId" from-field="parameters.geoAssocTypeId"/>
</entity-and>
+ <if-empty field="geoAssoc">
+ <set field="noOptions" value="_NA_"/>
+ <field-to-list list="geoList" field="noOptions"/>
+ <return/>
+ </if-empty>
<iterate list="geoAssoc" entry="geo">
<field-to-list list="geoList" field="geo.geoId"/>
</iterate>
- <if-empty field="geoList">
- <property-to-field resource="CommonUiLabels" property="CommonNoOptions" field="noOptions"/>
- <field-to-list list="geoList" field="noOptions"/>
- </if-empty>
<field-to-result field="geoList"/>
</simple-method>
Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl Fri Sep 24 12:47:15 2010
@@ -18,22 +18,24 @@ under the License.
-->
<script type="text/javascript">
jQuery(document).ready(function() {
-
+<#if asm_title?exists> <#-- set the dropdown "title" if exists -->
+ jQuery("#${asm_multipleSelect}").attr('title', '${asm_title}');
+</#if>
// use asmSelect
- jQuery("#${multipleSelect}").asmSelect({
+ jQuery("#${asm_multipleSelect}").asmSelect({
addItemTarget: 'top',
- sortable: ${sortable},
+ sortable: ${asm_sortable},
removeLabel: '${uiLabelMap.CommonRemove}'
});
-<#if relatedField?exists> <#-- can be used without related field -->
+<#if asm_relatedField?exists> <#-- can be used without related field -->
// track possible relatedField changes
- if (jQuery('#${multipleSelectForm}')) {
+ if (jQuery('#${asm_multipleSelectForm}')) {
// on initial focus or if the field value changes, select related multi values.
// FIXME : not sure why focus does not work here, must be added as event/action in the multipleSelectForm.relatedField
- jQuery("#${relatedField}").bind('change focus', function() {
- typeValue = jQuery('#${typeField}').val();
- selectMultipleRelatedValues('${requestName}', '${paramKey}', '${relatedField}', '${multipleSelect}', '${type}', typeValue, '${responseName}');
+ jQuery("#${asm_relatedField}").bind('change focus', function() {
+ typeValue = jQuery('#${asm_typeField}').val();
+ selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');
});
}
</#if>
@@ -41,12 +43,12 @@ jQuery(document).ready(function() {
</script>
<style type="text/css">
-#${multipleSelectForm} {
- width: ${formSize}px;
+#${asm_multipleSelectForm} {
+ width: ${asm_formSize}px;
position: relative;
}
.asmListItem {
- width: ${asmListItemPercentOfForm}%;
+ width: ${asm_asmListItemPercentOfForm}%;
}
</style>
\ No newline at end of file
Modified: ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml Fri Sep 24 12:47:15 2010
@@ -1535,6 +1535,10 @@
<value xml:lang="en">Link Geos (associate Geos to a Geo)</value>
<value xml:lang="fr">Lier des zones géographiques (association d'une avec plusieurs)</value>
</property>
+ <property key="WebtoolsGeosSelect">
+ <value xml:lang="en">Select Geos to associate</value>
+ <value xml:lang="fr">Sélectionner les zones géographiques à associer</value>
+ </property>
<property key="WebtoolsHits">
<value xml:lang="de">Besuche</value>
<value xml:lang="en">Hits</value>
Modified: ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml Fri Sep 24 12:47:15 2010
@@ -71,16 +71,16 @@
header-row-style="header-row" default-table-style="basic-table">
<field name="geoIds" title="${uiLabelMap.CommonGeos}">
<drop-down allow-multiple="true">
- <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
- <!--entity-constraint name="geoTypeId" operator="equals" value="COUNTRY"/--><!-- useful at least to test, else it's long... -->
- <entity-order-by field-name="geoName"/>
+ <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} (${geoId})">
+ <!--entity-constraint name="geoTypeId" operator="equals" value="GROUP"/--><!-- useful to quickly test -->
+ <entity-order-by field-name="geoId"/>
</entity-options>
</drop-down>
</field>
- <field name="dummy" title="${uiLabelMap.CommonEmptyHeader}" position="2"><display/></field>
- <field name="geoAssocTypeId" title="${uiLabelMap.CommonGeoAssocTypeId}" position="3"
+ <field name="dummy" title="${uiLabelMap.CommonEmptyHeader}"><display/></field>
+ <field name="geoAssocTypeId" title="${uiLabelMap.CommonGeoAssocTypeId}"
event="onChange"
- action="typeValue = jQuery('#${typeField}').val(); selectMultipleRelatedValues('${requestName}', '${paramKey}', '${relatedField}', '${multipleSelect}', '${type}', typeValue, '${responseName}');">
+ action="typeValue = jQuery('#${asm_typeField}').val(); selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');">
<drop-down>
<entity-options key-field-name="geoAssocTypeId" entity-name="GeoAssocType" description="${description}">
<entity-order-by field-name="description"/>
@@ -89,10 +89,10 @@
</field>
<field name="geoId" title="${uiLabelMap.CommonGeo}"
event="onFocus"
- action="typeValue = jQuery('#${typeField}').val(); selectMultipleRelatedValues('${requestName}', '${paramKey}', '${relatedField}', '${multipleSelect}', '${type}', typeValue, '${responseName}');">
+ action="typeValue = jQuery('#${asm_typeField}').val(); selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');">
<drop-down current="selected">
- <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
- <entity-order-by field-name="geoName"/>
+ <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} (${geoId})">
+ <entity-order-by field-name="geoId"/>
</entity-options>
</drop-down>
</field>
Modified: ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml?rev=1000847&r1=1000846&r2=1000847&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml Fri Sep 24 12:47:15 2010
@@ -101,19 +101,21 @@
<set field="noId" value="true"/><!-- see CommonGeoManagementDecorator -->
- <!-- asmslect parameters -->
- <set field="multipleSelectForm" value="LinkGeos"/>
- <set field="multipleSelect" value="LinkGeos_geoIds"/>
- <set field="formSize" value="422"/>
- <set field="asmListItemPercentOfForm" value="95"/>
- <set field="sortable" value="false"/>
+ <!-- asmslect parameters, must be prefixed by asm_ -->
+ <set field="asm_multipleSelectForm" value="LinkGeos"/>
+ <set field="asm_multipleSelect" value="LinkGeos_geoIds"/>
+ <set field="asm_formSize" value="700"/>
+ <set field="asm_asmListItemPercentOfForm" value="95"/>
+ <set field="asm_sortable" value="false"/>
+ <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
+ <set field="asm_title" value="${uiLabelMap.WebtoolsGeosSelect}"/>
<!-- selectMultipleRelatedValues parameters -->
- <set field="relatedField" value="LinkGeos_geoId"/>
- <set field="requestName" value="getRelatedGeos"/>
- <set field="paramKey" value="geoId"/>
- <set field="type" value="geoAssocTypeId"/>
- <set field="typeField" value="LinkGeos_geoAssocTypeId"/>
- <set field="responseName" value="geoList"/>
+ <set field="asm_relatedField" value="LinkGeos_geoId"/>
+ <set field="asm_requestName" value="getRelatedGeos"/>
+ <set field="asm_paramKey" value="geoId"/>
+ <set field="asm_type" value="geoAssocTypeId"/>
+ <set field="asm_typeField" value="LinkGeos_geoAssocTypeId"/>
+ <set field="asm_responseName" value="geoList"/>
</actions>
<widgets>
<decorator-screen name="CommonGeoManagementDecorator" location="component://webtools/widget/CommonScreens.xml">
Re: svn commit: r1000847 - in /ofbiz/branches/jquery: applications/accounting/widget/ap/ framework/common/script/org/ofbiz/common/ framework/common/webcommon/includes/ framework/webtools/config/ framework/webtools/widget/
Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, https://issues.apache.org/jira/browse/OFBIZ-3814
Jacques
From: "Adam Heath" <do...@brainfood.com>
> On 09/24/2010 07:47 AM, jleroux@apache.org wrote:
>> Modified:
>> ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml
>> ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
>> ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
>> ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml
>> ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml
>> ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml
>
> Sorry, haven't really paid attention here. Is the goal of this branch
> to try to convert as much as possible to jquery instead of prototype?
>
Re: svn commit: r1000847 - in /ofbiz/branches/jquery: applications/accounting/widget/ap/
framework/common/script/org/ofbiz/common/ framework/common/webcommon/includes/
framework/webtools/config/ framework/webtools/widget/
Posted by Adam Heath <do...@brainfood.com>.
On 09/24/2010 07:47 AM, jleroux@apache.org wrote:
> Modified:
> ofbiz/branches/jquery/applications/accounting/widget/ap/InvoiceScreens.xml
> ofbiz/branches/jquery/framework/common/script/org/ofbiz/common/CommonServices.xml
> ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
> ofbiz/branches/jquery/framework/webtools/config/WebtoolsUiLabels.xml
> ofbiz/branches/jquery/framework/webtools/widget/GeoManagementForms.xml
> ofbiz/branches/jquery/framework/webtools/widget/GeoManagementScreens.xml
Sorry, haven't really paid attention here. Is the goal of this branch
to try to convert as much as possible to jquery instead of prototype?