Author: jleroux
Date: Mon Sep 13 19:35:40 2010 New Revision: 996658 URL: http://svn.apache.org/viewvc?rev=996658&view=rev Log: New simple Geo Management in Webtools. It still misses a Geo Assoc Find Screen. For the moment in trunk the Link Geos screen use a standard multiple dropdown. It's not easy to use (see why at http://www.ryancramer.com/journal/entries/select_multiple). In the jQuery branch I have used the asmselect plugin, much easier for end users. Actually I'm not totally satisfied by it either. It's a beta and seems to be freezed. Also the way the field is shown is not flexible enough. It's a fixed size area and I tried to work around. I could be done better though. I will have a look. Sascha thought we could use jQuery.ui.sortable but I don't think it exactly corresponds to the feature needed. I have also changed some labels names and removed/grouped some requests (only in common now) Added: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml (with props) ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml (with props) Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/SegmentForms.xml ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml ofbiz/trunk/framework/common/servicedef/services.xml ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml ofbiz/trunk/framework/common/widget/LookupForms.xml ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl ofbiz/trunk/framework/webtools/widget/CommonScreens.xml ofbiz/trunk/framework/webtools/widget/Menus.xml Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Sep 13 19:35:40 2010 @@ -2169,8 +2169,6 @@ under the License. <request-map uri="LookupPartyName"><security auth="true" https="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> <request-map uri="LookupInternalOrganization"><security auth="true" https="true"/><response name="success" type="view" value="LookupInternalOrganization"/></request-map> - <request-map uri="LookupGeo"><security auth="true" https="true"/><response name="success" type="view" value="LookupGeo"/></request-map> - <request-map uri="LookupPayment"><security auth="true" https="true"/><response name="success" type="view" value="LookupPayment"/></request-map> <request-map uri="LookupInvoice"><security auth="true" https="true"/><response name="success" type="view" value="LookupInvoice"/></request-map> <request-map uri="LookupFixedAsset"><security auth="true" https="true"/><response name="success" type="view" value="LookupFixedAsset"/></request-map> @@ -2770,8 +2768,6 @@ under the License. <view-map name="LookupProductCategory" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductCategory"/> <view-map name="LookupProductStore" type="screen" page="component://product/widget/catalog/LookupScreens.xml#LookupProductStore"/> - <view-map name="LookupGeo" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeo"/> - <view-map name="LookupFixedAsset" type="screen" page="component://accounting/widget/LookupScreens.xml#LookupFixedAsset"/> <view-map name="LookupGlAccount" type="screen" page="component://accounting/widget/LookupScreens.xml#LookupGlAccount"/> <view-map name="LookupBillingAccount" page="component://accounting/widget/LookupScreens.xml#LookupBillingAccount" type="screen"/> Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/controller.xml Mon Sep 13 19:35:40 2010 @@ -365,7 +365,6 @@ under the License. <!-- Lookup request mappings --> <request-map uri="LookupSegmentGroup"><security https="true" auth="true"/><response name="success" type="view" value="LookupSegmentGroup"/></request-map> <request-map uri="LookupProductStore"><security https="true" auth="true"/><response name="success" type="view" value="LookupProductStore"/></request-map> - <request-map uri="LookupGeo"><security https="true" auth="true"/><response name="success" type="view" value="LookupGeo"/></request-map> <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> <request-map uri="LookupPartyClassificationGroup"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyClassificationGroup"/></request-map> @@ -446,7 +445,6 @@ under the License. <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/> <view-map name="LookupPartyClassificationGroup" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyClassificationGroup"/> <view-map name="LookupCommEvent" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupCommEvent"/> - <view-map name="LookupGeo" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeo"/> <view-map name="LookupContactMech" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupContactMech"/> <view-map name="TrackingCodeReport" type="screen" page="component://marketing/widget/MarketingReportScreens.xml#TrackingCodeReport"/> Modified: ofbiz/trunk/applications/marketing/widget/SegmentForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/SegmentForms.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/SegmentForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/SegmentForms.xml Mon Sep 13 19:35:40 2010 @@ -111,7 +111,7 @@ under the License. <field name="segmentGroupId"><hidden/></field> - <field name="geoId" title="${uiLabelMap.CommonSegmentGroupGeoId}"><lookup target-form-name="LookupGeo"/></field> + <field name="geoId" title="${uiLabelMap.CommonGeoId}"><lookup target-form-name="LookupGeo"/></field> <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="buttontext"><submit button-type="text-link"/></field> </form> <form name="listSegmentGroupGeo" list-name="segmentGroupGeos" target="" title="" type="list" paginate-target="listSegmentGroupGeo" @@ -122,7 +122,7 @@ under the License. </entity-and> </actions> <field name="segmentGroupId"><hidden/></field> - <field name="geoId" title="${uiLabelMap.CommonSegmentGroupGeoId}"><display-entity entity-name="Geo" description="${geoName} [Code:${geoCode}][ID:${geoId}]"/></field> + <field name="geoId" title="${uiLabelMap.CommonGeoId}"><display-entity entity-name="Geo" description="${geoName} [Code:${geoCode}][ID:${geoId}]"/></field> <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> <hyperlink target="deleteSegmentGroupGeo" description="${uiLabelMap.CommonDelete}" also-hidden="false"> <parameter param-name="segmentGroupId"/> Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Mon Sep 13 19:35:40 2010 @@ -2659,7 +2659,6 @@ under the License. <request-map uri="LookupContent"><security auth="true" https="true"/><response name="success" type="view" value="LookupContent"/></request-map> <request-map uri="LookupFixedAsset"><security auth="true" https="true"/><response name="success" type="view" value="LookupFixedAsset"/></request-map> <request-map uri="LookupPartyName"><security auth="true" https="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> - <request-map uri="LookupGeo"><security auth="true" https="true"/><response name="success" type="view" value="LookupGeo"/></request-map> <request-map uri="LookupOrderHeader"><security auth="true" https="true"/><response name="success" type="view" value="LookupOrderHeader"/></request-map> <request-map uri="LookupCommEvent"><security auth="true" https="true"/><response name="success" type="view" value="LookupCommEvent"/></request-map> @@ -2873,7 +2872,6 @@ under the License. <view-map name="LookupContent" page="component://content/widget/content/ContentScreens.xml#LookupContent" type="screen"/> <view-map name="LookupFixedAsset" type="screen" page="component://accounting/widget/LookupScreens.xml#LookupFixedAsset"/> <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/> - <view-map name="LookupGeo" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeo"/> <view-map name="LookupOrderHeader" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupOrderHeader"/> <view-map name="LookupCommEvent" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupCommEvent"/> Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Mon Sep 13 19:35:40 2010 @@ -6328,7 +6328,7 @@ <value xml:lang="it">Gruppo di sicurezza</value> <value xml:lang="zh">å®å ¨ç»</value> </property> - <property key="CommonSegmentGroupGeoAbbr"> + <property key="CommonGeoAbbr"> <value xml:lang="en">Abbreviation</value> <value xml:lang="es">Abreviación</value> <value xml:lang="fr">Abbréviation</value> @@ -6337,8 +6337,12 @@ <value xml:lang="ro">Abreviere</value> <value xml:lang="th">à¸à¸·à¹à¸à¸¢à¹à¸</value> <value xml:lang="zh">缩å</value> + </property> + <property key="CommonGeoAssocTypeId"> + <value xml:lang="en">Geo Assoc Type ID</value> + <value xml:lang="fr">Type d'assocation entre zones</value> </property> - <property key="CommonSegmentGroupGeoCode"> + <property key="CommonGeoCode"> <value xml:lang="en">Code</value> <value xml:lang="es">Código</value> <value xml:lang="fr">Code</value> @@ -6348,7 +6352,7 @@ <value xml:lang="th">รหัส</value> <value xml:lang="zh">代ç </value> </property> - <property key="CommonSegmentGroupGeoId"> + <property key="CommonGeoId"> <value xml:lang="en">Geo ID</value> <value xml:lang="es">Código ubicación</value> <value xml:lang="fr">Zone géographique</value> @@ -6358,7 +6362,7 @@ <value xml:lang="th">รหัสà¹à¸à¸£à¸à¸ªà¸£à¹à¸²à¸</value> <value xml:lang="zh">å°çæ è¯</value> </property> - <property key="CommonSegmentGroupGeoName"> + <property key="CommonGeoName"> <value xml:lang="en">Name</value> <value xml:lang="es">Nombre</value> <value xml:lang="fr">Nom</value> @@ -6368,7 +6372,7 @@ <value xml:lang="th">à¸à¸·à¹à¸</value> <value xml:lang="zh">å称</value> </property> - <property key="CommonSegmentGroupGeoSecCode"> + <property key="CommonGeoSecCode"> <value xml:lang="en">Secondary Code</value> <value xml:lang="es">Código secundario</value> <value xml:lang="fr">Code secondaire</value> @@ -6378,7 +6382,7 @@ <value xml:lang="th">รหัสà¸à¸µà¹à¸ªà¸à¸</value> <value xml:lang="zh">è¾ å©ä»£ç </value> </property> - <property key="CommonSegmentGroupGeoTypeId"> + <property key="CommonGeoTypeId"> <value xml:lang="en">Geo Type ID</value> <value xml:lang="es">Tipo de ubicación</value> <value xml:lang="fr">Type de zone géographique</value> @@ -6388,6 +6392,10 @@ <value xml:lang="th">รหัสà¸à¸£à¸°à¹à¸ à¸à¹à¸à¸£à¸à¸ªà¸£à¹à¸²à¸</value> <value xml:lang="zh">å°çç±»åæ è¯</value> </property> + <property key="CommonGeoWellKnownText"> + <value xml:lang="en">Well Known Text</value> + <value xml:lang="fr">Texte connu</value> + </property> <property key="CommonSelect"> <value xml:lang="ar">إختر</value> <value xml:lang="de">Auswählen</value> Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/CommonServices.xml Mon Sep 13 19:35:40 2010 @@ -268,5 +268,16 @@ under the License. </if-empty> <field-to-result field="stateList"/> </simple-method> - + + <simple-method method-name="linkGeos" short-description="Link Geos to another Geo"> + <iterate list="parameters.geoIds" entry="geoId"> + <make-value value-field="newGeoAssoc" entity-name="GeoAssoc"/> + <set field="newGeoAssoc.geoId" from-field="geoId"/> + <set field="newGeoAssoc.geoIdTo" from-field="parameters.geoId"/> + <set field="newGeoAssoc.geoAssocTypeId" from-field="parameters.geoAssocTypeId"/> + <create-value value-field="newGeoAssoc"/> + <check-errors/> + </iterate> + </simple-method> + </simple-methods> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Mon Sep 13 19:35:40 2010 @@ -680,6 +680,37 @@ under the License. <attribute name="attributeMap" type="Map" mode="OUT" optional="true"/> </service> + <!-- Geo services --> + <service name="createGeo" default-entity-name="Geo" engine="entity-auto" invoke="create" auth="true"> + <description>Create a Geo</description> + <permission-service service-name="commonGenericPermission" main-action="CREATE"/> + <auto-attributes include="pk" mode="INOUT" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="geoTypeId" optional="false"/> + <override name="geoName" optional="false"/> + </service> + <service name="updateGeo" default-entity-name="Geo" engine="entity-auto" invoke="update" auth="true"> + <description>Update a Geo</description> + <permission-service service-name="commonGenericPermission" main-action="UPDATE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="geoTypeId" optional="false"/> + <override name="geoName" optional="false"/> + </service> + <service name="deleteGeo" default-entity-name="Geo" engine="entity-auto" invoke="delete" auth="true"> + <description>Delete a Geo</description> + <permission-service service-name="commonGenericPermission" main-action="DELETE"/> + <auto-attributes include="pk" mode="IN" optional="false"/> + </service> + <service name="linkGeos" engine="simple" auth="true" + location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="linkGeos"> + <description>Link Geos to another Geo</description> + <permission-service service-name="commonGenericPermission" main-action="CREATE"/> + <attribute name="geoIds" type="List" mode="IN"></attribute> + <attribute name="geoId" type="String" mode="IN"></attribute> + <attribute name="geoAssocTypeId" type="String" mode="IN"></attribute> + </service> + <!-- GeoPoint services --> <service name="createGeoPoint" default-entity-name="GeoPoint" engine="entity-auto" invoke="create" auth="true"> <description>Create a GeoPoint</description> Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original) +++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Mon Sep 13 19:35:40 2010 @@ -207,9 +207,11 @@ under the License. <response name="success" type="request" value="json"/> <response name="error" type="request" value="json"/> </request-map> + + <request-map uri="LookupGeo"><security https="true" auth="true"/><response name="success" type="view" value="LookupGeo"/></request-map> <!--========================== AJAX events =====================--> - - + + <!-- View Mappings --> <view-map name="error" page="/error/error.jsp"/> <view-map name="main" type="none"/> @@ -230,4 +232,6 @@ under the License. <view-map name="ShowDocument" type="screen" page="component://common/widget/HelpScreens.xml#showDocument"/> <view-map name="viewBlocked" type="screen" page="component://common/widget/CommonScreens.xml#viewBlocked"/> + + <view-map name="LookupGeo" type="screen" page="component://common/widget/LookupScreens.xml#LookupGeo"/> </site-conf> Modified: ofbiz/trunk/framework/common/widget/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/LookupForms.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/LookupForms.xml (original) +++ ofbiz/trunk/framework/common/widget/LookupForms.xml Mon Sep 13 19:35:40 2010 @@ -22,18 +22,18 @@ under the License. xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> <!-- Geo Lookup forms --> <form name="LookupGeo" target="LookupGeo" title="" type="single"> - <field name="geoId" title="${uiLabelMap.CommonSegmentGroupGeoId}"><text-find/></field> - <field name="geoTypeId" title="${uiLabelMap.CommonSegmentGroupGeoTypeId}"> + <field name="geoId" title="${uiLabelMap.CommonGeoId}"><text-find/></field> + <field name="geoTypeId" title="${uiLabelMap.CommonGeoTypeId}"> <drop-down allow-empty="true"> <entity-options key-field-name="geoTypeId" entity-name="GeoType" description="${description}"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> - <field name="geoName" title="${uiLabelMap.CommonSegmentGroupGeoName}"><text-find/></field> - <field name="geoCode" title="${uiLabelMap.CommonSegmentGroupGeoCode}"><text-find/></field> - <field name="geoSecCode" title="${uiLabelMap.CommonSegmentGroupGeoSecCode}"><text-find/></field> - <field name="abbreviation" title="${uiLabelMap.CommonSegmentGroupGeoAbbr}"><text-find/></field> + <field name="geoName" title="${uiLabelMap.CommonGeoName}"><text-find/></field> + <field name="geoCode" title="${uiLabelMap.CommonGeoCode}"><text-find/></field> + <field name="geoSecCode" title="${uiLabelMap.CommonGeoSecCode}"><text-find/></field> + <field name="abbreviation" title="${uiLabelMap.CommonGeoAbbr}"><text-find/></field> <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> @@ -47,15 +47,16 @@ under the License. <field-map field-name="viewSize" from-field="viewSize"/> </service> </actions> - <field name="geoId" widget-style="buttontext" title="${uiLabelMap.CommonSegmentGroupGeoId}"> + <field name="geoId" widget-style="buttontext" title="${uiLabelMap.CommonGeoId}"> <hyperlink also-hidden="false" target-type="plain" description="${geoId}" target="javascript:set_value('${geoId}')"/> </field> - <field name="geoTypeId" title="${uiLabelMap.CommonSegmentGroupGeoTypeId}"> + <field name="geoTypeId" title="${uiLabelMap.CommonGeoTypeId}"> <display-entity key-field-name="geoTypeId" entity-name="GeoType" description="${description}"/> </field> - <field name="geoName" title="${uiLabelMap.CommonSegmentGroupGeoName}"><display/></field> - <field name="geoCode" title="${uiLabelMap.CommonSegmentGroupGeoCode}"><display/></field> - <field name="geoSecCode" title="${uiLabelMap.CommonSegmentGroupGeoSecCode}"><display/></field> - <field name="abbreviation" title="${uiLabelMap.CommonSegmentGroupGeoAbbr}"><display/></field> + <field name="geoName" title="${uiLabelMap.CommonGeoName}"><display/></field> + <field name="geoCode" title="${uiLabelMap.CommonGeoCode}"><display/></field> + <field name="geoSecCode" title="${uiLabelMap.CommonGeoSecCode}"><display/></field> + <field name="abbreviation" title="${uiLabelMap.CommonGeoAbbr}"><display/></field> + <field name="wellKnownText" title="${uiLabelMap.CommonGeoWellKnownText}"><display/></field> </form> </forms> Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml (original) +++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml Mon Sep 13 19:35:40 2010 @@ -1482,7 +1482,7 @@ <property key="WebtoolsGeneralArtifactInfoTools"> <value xml:lang="de">Allgemeine Info</value> <value xml:lang="en">General Artifact Info Tools</value> - <value xml:lang="fr">Outils généraux pour les info à propos des éléments d'OFBiz</value> + <value xml:lang="fr">Outils généraux pour les informations sur les éléments d'OFBiz</value> <value xml:lang="it">Strumento per informazioni generali su artifatti</value> <value xml:lang="zh">éç¨äººå·¥ç¨åºä¿¡æ¯å·¥å ·</value> </property> @@ -1510,6 +1510,30 @@ <value xml:lang="th">à¸à¸·à¹à¸à¸à¸¥à¸¸à¹à¸¡</value> <value xml:lang="zh">ç»å称</value> </property> + <property key="WebtoolsGeoCreateNew"> + <value xml:lang="en">Create New Geo</value> + <value xml:lang="fr">Créer une zone géographique</value> + </property> + <property key="WebtoolsGeoEdit"> + <value xml:lang="en">Edit Geo</value> + <value xml:lang="fr">Modifier la zone géographique</value> + </property> + <property key="WebtoolsGeoManagement"> + <value xml:lang="en">Geo Management</value> + <value xml:lang="fr">Gestion des zones géographiques</value> + </property> + <property key="WebtoolsGeosFind"> + <value xml:lang="en">Find Geos</value> + <value xml:lang="fr">Recherche de zones géographiques</value> + </property> + <property key="WebtoolsGeosLink"> + <value xml:lang="en">Link Geos</value> + <value xml:lang="fr">Lier des zones géographiques</value> + </property> + <property key="WebtoolsGeosLinkExplained"> + <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="WebtoolsHits"> <value xml:lang="de">Besuche</value> <value xml:lang="en">Hits</value> @@ -3534,7 +3558,7 @@ <value xml:lang="en">Title</value> <value xml:lang="fr">Titre</value> <value xml:lang="it">Titolo</value> - <value xml:lang="nl">Titel</value> + <value xml:lang="nl">Titel</value> <value xml:lang="ro">Titlu</value> <value xml:lang="th">หัวà¹à¸£à¸·à¹à¸à¸</value> <value xml:lang="zh">æ é¢</value> @@ -3775,5 +3799,5 @@ <value xml:lang="ro">Tu poti crea o Entitate ${entityName} si introducand valorile care le vrei, si click_and tasta Creare.</value> <value xml:lang="th">à¸à¸¸à¸à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸µà¹à¸à¸°à¸ªà¸£à¹à¸²à¸ Entity à¹à¸à¹ ${entityName} à¹à¸à¸¢à¸à¸²à¸£à¹à¸à¹à¸²à¸ªà¸¹à¹à¸à¹à¸²à¸à¸µà¹à¸à¸¸à¸à¸à¹à¸à¸à¸à¸²à¸£à¹à¸¥à¸°à¸à¸¥à¸´à¸ Create.</value> <value xml:lang="zh">å建ä¸ä¸ªå®ä½ ${entityName} ï¼è¾å ¥å¼ï¼ç¶åç¹å»æ°å»º.</value> - </property> + </property> </resource> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Mon Sep 13 19:35:40 2010 @@ -612,7 +612,38 @@ under the License. <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> + <request-map uri="LinkGeos"><security https="true" auth="true"/><response name="success" type="view" value="LinkGeos"/></request-map> + <request-map uri="createGeo"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="createGeo"/> + <response name="success" type="view" value="EditGeo"/> + <response name="error" type="view" value="EditGeo"/> + </request-map> + <request-map uri="updateGeo"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="updateGeo"/> + <response name="success" type="view" value="EditGeo"/> + <response name="error" type="view" value="EditGeo"/> + </request-map> + <request-map uri="deleteGeo"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="deleteGeo"/> + <response name="success" type="request-redirect" value="FindGeo"> + <redirect-parameter name="noConditionFind"/> + </response> + <response name="error" type="view" value="FindGeo"/> + </request-map> + <request-map uri="linkGeos"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="linkGeos"/> + <response name="success" type="view" value="LinkGeos"/> + <response name="error" type="view" value="LinkGeos"/> + </request-map> + <!-- end of request mappings --> <!-- View Mappings --> @@ -706,5 +737,10 @@ under the License. <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"/> + <view-map name="EditGeo" type="screen" page="component://webtools/widget/GeoManagementScreens.xml#EditGeo"/> + <view-map name="LinkGeos" type="screen" page="component://webtools/widget/GeoManagementScreens.xml#LinkGeos"/> + <!-- end of view mappings --> </site-conf> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/main.ftl Mon Sep 13 19:35:40 2010 @@ -97,6 +97,7 @@ under the License. <li><h3>${uiLabelMap.WebtoolsMiscSetupTools}</h3></li> <#if security.hasPermission("PORTALPAGE_MAINT", session)> <li><a href="<@ofbizUrl>FindPortalPage</@ofbizUrl>">${uiLabelMap.WebtoolsAdminPortalPage}</a></li> + <li><a href="<@ofbizUrl>FindGeo</@ofbizUrl>">${uiLabelMap.WebtoolsGeoManagement}</a></li> </#if> <#if security.hasPermission("ENUM_STATUS_MAINT", session)> <#-- Modified: ofbiz/trunk/framework/webtools/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/CommonScreens.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/CommonScreens.xml Mon Sep 13 19:35:40 2010 @@ -295,5 +295,42 @@ under the License. <decorator-section-include name="body"/> </widgets> </section> - </screen> + </screen> + + <screen name="CommonGeoManagementDecorator"> + <section> + <actions> + <set field="headerItem" value="geoManagement"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="pre-body"> + <section> + <condition> + <if-has-permission permission="WEBTOOLS" action="_VIEW"/> + </condition> + <widgets> + <include-menu name="geoManagement" location="component://webtools/widget/Menus.xml"/> + </widgets> + </section> + </decorator-section> + <decorator-section name="body"> + <section> + <!-- do check for WEBTOOLS, _VIEW permission --> + <condition> + <if-has-permission permission="WEBTOOLS" action="_VIEW"/> + </condition> + <widgets> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.WebtoolsPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + </screens> Added: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml?rev=996658&view=auto ============================================================================== --- ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml (added) +++ ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml Mon Sep 13 19:35:40 2010 @@ -0,0 +1,89 @@ +<?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"> + + <form name="FindGeo" id="FindGeo" target="${currentUrl}" extends="LookupGeo" extends-resource="component://common/widget/LookupForms.xml"/> + + <form name="ListGeos" extends-resource="component://common/widget/LookupForms.xml" extends="listLookupGeo" paginate-target="${currentUrl}" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" separate-columns="true" > + <field name="geoId" widget-style="buttontext" title="${uiLabelMap.CommonGeoId}"> + <hyperlink also-hidden="false" target-type="plain" description="${geoId}" target="EditGeo"> + <parameter param-name="geoId"/> + </hyperlink> + </field> + <field name="wellKnownText" title="${uiLabelMap.CommonGeoWellKnownText}"><display/></field> + <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink target="deleteGeo" description="${uiLabelMap.CommonRemove}"> + <parameter param-name="geoId"/> + <parameter param-name="noConditionFind" value="Y"/> + </hyperlink> + </field> + <field name="noConditionFind"><hidden value="N"/></field> + </form> + + <form name="EditGeo" type="single" target="updateGeo" title="" default-map-name="geo" + header-row-style="header-row" default-table-style="basic-table"> + <alt-target use-when="geo==null" target="createGeo"/> + <field name="geoId" title="${uiLabelMap.CommonGeoId}"><text/></field> + <field name="geoTypeId" title="${uiLabelMap.CommonGeoTypeId}"> + <drop-down allow-empty="true"> + <entity-options key-field-name="geoTypeId" entity-name="GeoType" description="${description}"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="geoName" title="${uiLabelMap.CommonGeoName}"><text/></field> + <field name="geoCode" title="${uiLabelMap.CommonGeoCode}"><text/></field> + <field name="geoSecCode" title="${uiLabelMap.CommonGeoSecCode}"><text/></field> + <field name="abbreviation" title="${uiLabelMap.CommonGeoAbbr}"><text/></field> + <field name="wellKnownText" title="${uiLabelMap.CommonGeoWellKnownText}"><textarea/></field> + + <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + + <form name="LinkGeos" type="single" target="linkGeos" title="" 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> + </drop-down> + </field> + <field name="geoAssocTypeId" title="${uiLabelMap.CommonGeoAssocTypeId}"> + <drop-down allow-empty="true"> + <entity-options key-field-name="geoAssocTypeId" entity-name="GeoAssocType" description="${description}"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="geoId" title="${uiLabelMap.CommonGeo}"> + <drop-down> + <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}"> + <entity-order-by field-name="geoName"/> + </entity-options> + </drop-down> + </field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit" ><submit button-type="button"/></field> + </form> + +</forms> Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml?rev=996658&view=auto ============================================================================== --- ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml (added) +++ ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml Mon Sep 13 19:35:40 2010 @@ -0,0 +1,98 @@ +<?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. +--> + +<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="FindGeo"> + <section> + <actions> + <set field="titleProperty" value="WebtoolsGeosFind"/> + <set field="currentUrl" value="FindGeo"/> + <set field="headerItem" value="Geos"/> + </actions> + <widgets> + <decorator-screen name="CommonGeoManagementDecorator" location="component://webtools/widget/CommonScreens.xml"> + <decorator-section name="body"> + <container style="no-clear"> + <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="search-options"> + <include-form name="FindGeo" location="component://webtools/widget/GeoManagementForms.xml"/> + </decorator-section> + <decorator-section name="search-results"> + <screenlet title="${uiLabelMap.CommonGeos}"> + <include-form name="ListGeos" location="component://webtools/widget/GeoManagementForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="EditGeo"> + <section> + <actions> + <set field="titleProperty" value="WebtoolsGeoEdit"/> + <set field="tabButtonItem" value="EditGeo"/> + + <set field="geoId" from-field="parameters.geoId"/> + <entity-one entity-name="Geo" value-field="geo"/> + </actions> + <widgets> + <decorator-screen name="CommonGeoManagementDecorator" location="component://webtools/widget/CommonScreens.xml"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.WebtoolsGeoEdit}"> + <include-form name="EditGeo" location="component://webtools/widget/GeoManagementForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="LinkGeos"> + <section> + <actions> + <set field="titleProperty" value="WebtoolsGeosLink"/> + <set field="currentUrl" value="LinkGeos"/> + <set field="headerItem" value="Geos"/> + + <set field="noId" value="true"/><!-- see CommonGeoManagementDecorator --> + + <set field="multipleSelect" value="geoIds"/> + <set field="multipleSelectForm" value="LinkGeos"/> + <set field="formSize" value="422"/> + <set field="asmListItemPercentOfForm" value="95"/> + <set field="sortable" value="false"/> + </actions> + <widgets> + <decorator-screen name="CommonGeoManagementDecorator" location="component://webtools/widget/CommonScreens.xml"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.WebtoolsGeosLinkExplained}"> + <include-form name="LinkGeos" location="component://webtools/widget/GeoManagementForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> +</screens> Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/Menus.xml?rev=996658&r1=996657&r2=996658&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/Menus.xml (original) +++ ofbiz/trunk/framework/webtools/widget/Menus.xml Mon Sep 13 19:35:40 2010 @@ -45,6 +45,9 @@ under the License. <menu-item name="configuration" title="${uiLabelMap.WebtoolsConfiguration}"> <link target="myCertificates"/> </menu-item> + <menu-item name="geoManagement" title="${uiLabelMap.WebtoolsGeoManagement}"> + <link target="FindGeo"/> + </menu-item> <menu-item name="portalAdmin" title="${uiLabelMap.WebtoolsAdminPortalPage}"> <condition><if-has-permission permission="PORTALPAGE_MAINT"/></condition> <link target="FindPortalPage"/> @@ -256,4 +259,18 @@ under the License. <link target="FindUtilCache"/> </menu-item> </menu> + + <menu name="geoManagement" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <!--menu-container-style="button-bar button-style-2 no-clear"--> + <menu-item name="FindGeo" title="${uiLabelMap.WebtoolsGeosFind}"> + <link target="FindGeo"/> + </menu-item> + <menu-item name="EditGeo" title="${uiLabelMap.WebtoolsGeoCreateNew}"> + <link target="EditGeo"/> + </menu-item> + <menu-item name="LinkGeos" title="${uiLabelMap.WebtoolsGeosLink}"> + <link target="LinkGeos"/> + </menu-item> + </menu> + </menus> |
Free forum by Nabble | Edit this page |