Author: hansbak
Date: Sat Aug 27 08:21:01 2011 New Revision: 1162312 URL: http://svn.apache.org/viewvc?rev=1162312&view=rev Log: allow the listing of all preference groups in the partymanager user preferences Modified: ofbiz/trunk/applications/party/data/PartyTypeData.xml ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/entitydef/entitymodel.xml Modified: ofbiz/trunk/applications/party/data/PartyTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyTypeData.xml?rev=1162312&r1=1162311&r2=1162312&view=diff ============================================================================== --- ofbiz/trunk/applications/party/data/PartyTypeData.xml (original) +++ ofbiz/trunk/applications/party/data/PartyTypeData.xml Sat Aug 27 08:21:01 2011 @@ -435,7 +435,8 @@ under the License. <UserPrefGroupType userPrefGroupTypeId="GLOBAL_PREFERENCES" description="Global preferences"/> <UserPreference userLoginId="_NA_" userPrefTypeId="ORGANIZATION_PARTY" userPrefGroupTypeId="GLOBAL_PREFERENCES" userPrefValue="DEFAULT"/> - <EnumerationType description="Global preferences" enumTypeId="GLOBAL_PREFERENCES" hasTable="N" parentTypeId=""/> + <EnumerationType description="User preference groups" enumTypeId="USER_PREF_GROUPS" hasTable="N" parentTypeId=""/> + <EnumerationType description="Global preferences" enumTypeId="GLOBAL_PREFERENCES" hasTable="N" parentTypeId="USER_PREF_GROUPS"/> <Enumeration description="Organization party" enumCode="" enumId="ORGANIZATION_PARTY" sequenceId="01" enumTypeId="GLOBAL_PREFERENCES"/> <Enumeration description="Visual Theme" enumCode="" enumId="VISUAL_THEME" sequenceId="02" enumTypeId="GLOBAL_PREFERENCES"/> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1162312&r1=1162311&r2=1162312&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Sat Aug 27 08:21:01 2011 @@ -1025,7 +1025,7 @@ under the License. <field name="description" title="${uiLabelMap.CommonDescription}" required-field="true"><text/></field> <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field> </form> - <form name="ListPreference" type="list" target="removePreference" list-name="userPreferenceList" + <form name="ListPreference" type="list" target="removePreference" list-name="enumTypeChildAndEnums" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true" use-row-submit="true" > <row-actions> <service service-name="getUserPreference" result-map="values"> @@ -1034,11 +1034,12 @@ under the License. <set field="userPrefValue" from-field="values.userPrefValue"/> </row-actions> <field name="enumId" parameter-name="userPrefTypeId"><hidden value="${enumId}"/></field> - <field name="enumTypeId" parameter-name="userPrefGroupTypeId"><hidden value="${enumTypeId}"/></field> - <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> + <field name="childEnumTypeId" parameter-name="userPrefGroupTypeId"><hidden value="${enumTypeId}"/></field> + <field name="childDescription" title="${uiLabelMap.CommonPreferenceGroup}"><display/></field> + <field name="description" title="${uiLabelMap.CommonPreferenceName}"><display/></field> <field name="partyId"><hidden/></field> <field name="userPrefUserLoginId"><hidden/></field> - <field name="userPrefValue" title="${uiLabelMap.CommonValue}"><display></display></field> + <field name="userPrefValue" title="${uiLabelMap.CommonValue}"><display/></field> <field name="submit" title="${uiLabelMap.CommonRemove}" use-when="userPrefValue!=null"><submit/></field> </form> <form name="PartyBillingAccount" type="list" list-name="billingAccounts" default-table-style="basic-table hover-bar"> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1162312&r1=1162311&r2=1162312&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Sat Aug 27 08:21:01 2011 @@ -1099,8 +1099,8 @@ under the License. <set field="headerItem" value="find"/> <set field="tabButtonItem" value="preferences"/> <set field="partyId" from-field="parameters.partyId"/> - <entity-and entity-name="Enumeration" list="userPreferenceList"> - <field-map field-name="enumTypeId" value="GLOBAL_PREFERENCES"/> + <entity-and entity-name="EnumTypeChildAndEnum" list="enumTypeChildAndEnums"> + <field-map field-name="parentEnumTypeId" value="USER_PREF_GROUPS"/> </entity-and> <entity-and entity-name="UserLogin" list="userLogins"> <field-map field-name="partyId" from-field="parameters.partyId"/> @@ -1115,7 +1115,7 @@ under the License. <set field="userPrefUserLoginId" from-field="userLogin.userLoginId"/> </actions> <widgets> - <screenlet title="${uiLabelMap.CommonPreferences} ${uiLabelMap.CommonFor} ${userPrefUserLoginId}" > + <screenlet title="${uiLabelMap.CommonPreferences} ${uiLabelMap.CommonFor} userLogin: ${userPrefUserLoginId}" > <include-form name="ListPreference" location="component://party/widget/partymgr/PartyForms.xml"/> </screenlet> </widgets> Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=1162312&r1=1162311&r2=1162312&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sat Aug 27 08:21:01 2011 @@ -6420,6 +6420,12 @@ <value xml:lang="zh">设置</value> <value xml:lang="zh_TW">è¨ç½®</value> </property> + <property key="CommonPreferenceGroup"> + <value xml:lang="en">Preference Group</value> + </property> + <property key="CommonPreferenceName"> + <value xml:lang="en">Preference Name</value> + </property> <property key="CommonPrepared"> <value xml:lang="ar">٠عدة</value> <value xml:lang="de">Vorbereitet</value> Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/entitydef/entitymodel.xml?rev=1162312&r1=1162311&r2=1162312&view=diff ============================================================================== --- ofbiz/trunk/framework/common/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/framework/common/entitydef/entitymodel.xml Sat Aug 27 08:21:01 2011 @@ -118,6 +118,24 @@ under the License. </relation> </entity> + <view-entity entity-name="EnumTypeChildAndEnum" package-name="org.ofbiz.common.enum"> + <member-entity entity-alias="PARENT" entity-name="EnumerationType"/> + <member-entity entity-alias="CHILD" entity-name="EnumerationType"/> + <member-entity entity-alias="ENUM" entity-name="Enumeration"/> + <alias-all entity-alias="PARENT" prefix="parent"/> + <alias-all entity-alias="CHILD" prefix="child"> + <exclude field="parentTypeId"/> + </alias-all> + <alias-all entity-alias="ENUM"/> + <view-link entity-alias="PARENT" rel-entity-alias="CHILD"> + <key-map field-name="enumTypeId" rel-field-name="parentTypeId"/> + </view-link> + <view-link entity-alias="CHILD" rel-entity-alias="ENUM"> + <key-map field-name="enumTypeId"/> + </view-link> + </view-entity> + + <!-- ========================================================= --> <!-- org.ofbiz.common.geo --> <!-- ========================================================= --> |
Free forum by Nabble | Edit this page |