Author: jacopoc
Date: Wed Nov 8 00:11:41 2006 New Revision: 472420 URL: http://svn.apache.org/viewvc?view=rev&rev=472420 Log: One more content screen converted to widgets. Now there are just 10 remaining JPublish screens (all in the layout/template menu)... I've tried to work on them but I'm giving up since they seem too broken/incomplete/dirty and I'm too ignorant about them to try to understand how they work from the source code: maybe someone out there that knows better than me that pages (and their statsus) could help with this, at least with a few suggestions. It would be really great to finalize this effort because these JPublish pages are the LAST 10 ones that we have in OFBiz. Added: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/ incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh (with props) Removed: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/data/ incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/pagedefs/datasetup/ incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/EditDataCategory.ftl incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/datasetup_menu.ftl Modified: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/DataSetupForms.xml incubator/ofbiz/trunk/applications/content/widget/datasetup/DataResourceSetupScreens.xml Added: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh?view=auto&rev=472420 ============================================================================== --- incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh (added) +++ incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh Wed Nov 8 00:11:41 2006 @@ -0,0 +1,39 @@ +/* + * Copyright 2001-2006 The Apache Software Foundation + * + * Licensed 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. + */ + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.ofbiz.base.util.*; +import org.ofbiz.entity.*; +import org.ofbiz.content.data.DataResourceWorker; + +/** + * This script calls two methods in DataResourceWorker to build an indented + * DataCategory picklist. + */ + + +List dataCategoryTrail = new ArrayList(); +Map rootNode = new HashMap(); +rootNode.put("id", "ROOT"); +DataResourceWorker.getDataCategoryMap(delegator, 0, rootNode, dataCategoryTrail, true); +List dataCategoryList = new ArrayList(); +DataResourceWorker.buildList(rootNode, dataCategoryList, 0); + +context.put("dataCategoryList", dataCategoryList); Propchange: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?view=diff&rev=472420&r1=472419&r2=472420 ============================================================================== --- incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Wed Nov 8 00:11:41 2006 @@ -1586,7 +1586,7 @@ <view-map name="EditDataResourceType" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditDataResourceType" type="screen"/> <view-map name="EditDataResourceTypeAttr" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditDataResourceTypeAttr" type="screen"/> - <view-map name="EditDataCategory" page="/datasetup/EditDataCategory.ftl" type="jpublish"/> + <view-map name="EditDataCategory" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditDataCategory" type="screen"/> <view-map name="EditMetaDataPredicate" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditMetaDataPredicate" type="screen"/> <view-map name="EditCharacterSet" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditCharacterSet" type="screen"/> <view-map name="EditFileExtension" page="component://content/widget/datasetup/DataResourceSetupScreens.xml#EditFileExtension" type="screen"/> Modified: incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/DataSetupForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/DataSetupForms.xml?view=diff&rev=472420&r1=472419&r2=472420 ============================================================================== --- incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/DataSetupForms.xml (original) +++ incubator/ofbiz/trunk/applications/content/webapp/content/datasetup/DataSetupForms.xml Wed Nov 8 00:11:41 2006 @@ -142,7 +142,7 @@ name="UpdateDataCategory" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox" - list-name="contentList" + list-name="dataCategoryList" target="updateDataCategory" title="" type="list"> <auto-fields-service service-name="updateDataCategory"/> <field name="dataCategoryId" widget-style="tabletext"> Modified: incubator/ofbiz/trunk/applications/content/widget/datasetup/DataResourceSetupScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/content/widget/datasetup/DataResourceSetupScreens.xml?view=diff&rev=472420&r1=472419&r2=472420 ============================================================================== --- incubator/ofbiz/trunk/applications/content/widget/datasetup/DataResourceSetupScreens.xml (original) +++ incubator/ofbiz/trunk/applications/content/widget/datasetup/DataResourceSetupScreens.xml Wed Nov 8 00:11:41 2006 @@ -137,4 +137,25 @@ </widgets> </section> </screen> + <screen name="EditDataCategory"> + <section> + <condition> + <if-has-permission permission="CONTENTMGR" action="UPDATE"/> + </condition> + <actions> + <set field="titleProperty" value="PageTitleEditMimeType"/> + <set field="headerItem" value="DataResourceSetupMenu"/> + <set field="tabButtonItem" to-scope="user" value="EditDataCategory"/> + <script location="component://content/webapp/content/WEB-INF/actions/datasetup/datacategoryprep.bsh"/> + </actions> + <widgets> + <decorator-screen name="commonDataResourceSetupDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-form name="UpdateDataCategory" location="component://content/webapp/content/datasetup/DataSetupForms.xml"/> + <include-form name="AddDataCategory" location="component://content/webapp/content/datasetup/DataSetupForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> |
Free forum by Nabble | Edit this page |