Author: adrianc
Date: Wed Jun 4 14:49:38 2008 New Revision: 663378 URL: http://svn.apache.org/viewvc?rev=663378&view=rev Log: A basic implementation of a help system, based on work contributed by Bruno Busco - https://issues.apache.org/jira/browse/OFBIZ-1750. There is an example of how it is used in the EditExample screen of the Example component. Added: ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml (with props) ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml (with props) Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml ofbiz/trunk/framework/common/webcommon/includes/simple.ftl ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Added: ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml?rev=663378&view=auto ============================================================================== --- ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml (added) +++ ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml Wed Jun 4 14:49:38 2008 @@ -0,0 +1,27 @@ +<?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. +--> +<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <property key="HelpNotFound"> + <value xml:lang="en">Help topic not found.</value> + </property> + <property key="PageTitleHelp"> + <value xml:lang="en">Open for Business Help</value> + </property> +</resource> Propchange: ofbiz/trunk/framework/common/config/CommonHelpUiLabels.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Wed Jun 4 14:49:38 2008 @@ -2584,6 +2584,9 @@ <value xml:lang="ru">ÐÑиоÑÑановленнÑе</value> <value xml:lang="th">à¸à¸²à¸£à¸à¸§à¸à¸à¸¸à¸¡</value> </property> + <property key="CommonHelp"> + <value xml:lang="en">Help</value> + </property> <property key="CommonHideFields"> <value xml:lang="ar">اخÙاء اÙØÙÙÙ</value> <value xml:lang="de">Felder ausblenden</value> 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=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original) +++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Wed Jun 4 14:49:38 2008 @@ -106,6 +106,12 @@ <response name="success" type="view" value="ajaxAutocompleteOptions" /> </request-map> + <!-- Online help system mapping --> + <request-map uri="help"> + <security https="true" auth="true"/> + <response name="success" type="view" value="help" /> + </request-map> + <!-- View Mappings --> <view-map name="error" page="/error/error.jsp"/> <view-map name="login" type="screen" page="component://common/widget/CommonScreens.xml#login"/> @@ -116,4 +122,5 @@ <view-map name="LookupTimezones" type="screen" page="component://common/widget/LookupScreens.xml#LookupTimezones"/> <view-map name="ajaxAutocompleteOptions" type="screen" page="component://common/widget/CommonScreens.xml#ajaxAutocompleteOptions"/> + <view-map name="help" type="screen" page="component://common/widget/CommonScreens.xml#help"/> </site-conf> Modified: ofbiz/trunk/framework/common/webcommon/includes/simple.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/simple.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/simple.ftl Wed Jun 4 14:49:38 2008 @@ -54,7 +54,7 @@ ${layoutSettings.extraHead?if_exists} </head> -<body id="column-container"> +<body id="column-container" style="background: white;"> <form name="printPage"> <input type="button" value="${uiLabelMap.CommonPrint}" onClick="window.print()" class="smallSubmit"/> </form> Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Wed Jun 4 14:49:38 2008 @@ -382,4 +382,22 @@ </section> </screen> + <screen name="help"> + <section> + <actions> + <set field="titleProperty" value="PageTitleHelp"></set> + <property-map resource="CommonHelpUiLabels" map-name="uiLabelMap" global="true"/> + <set field="helpText" value="${uiLabelMap.${parameters.topic}}" default-value="${uiLabelMap.HelpNotFound}"/> + </actions> + <widgets> + <decorator-screen name="SimpleDecorator"> + <decorator-section name="body"> + <container style="h1"><label>${uiLabelMap.PageTitleHelp}</label></container> + <container style="h3"><label>${helpText}</label></container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + </screens> Added: ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml?rev=663378&view=auto ============================================================================== --- ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml (added) +++ ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml Wed Jun 4 14:49:38 2008 @@ -0,0 +1,24 @@ +<?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. +--> +<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <property key="EditExampleHelp"> + <value xml:lang="en">An example of a Help screen.</value> + </property> +</resource> Propchange: ofbiz/trunk/framework/example/config/ExampleHelpUiLabels.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml Wed Jun 4 14:49:38 2008 @@ -175,6 +175,7 @@ <!-- View Mappings --> <view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/> + <view-map name="help" type="screen" page="component://example/widget/example/ExampleScreens.xml#help"/> <view-map name="FindExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#FindExample"/> <view-map name="EditExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExample"/> Modified: ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml Wed Jun 4 14:49:38 2008 @@ -49,6 +49,9 @@ <menu-item name="EditExampleFeatureAppls" title="${uiLabelMap.ExampleFeatures}"> <link target="EditExampleFeatureAppls?exampleId=${exampleId}"/> </menu-item> + <menu-item name="EditExampleHelp" title="${uiLabelMap.CommonHelp}"> + <link target="help?topic=EditExampleHelp" target-window="_blank"/> + </menu-item> </menu> <menu name="EditExampleFeature" default-selected-style="selected" type="simple" Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?rev=663378&r1=663377&r2=663378&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Wed Jun 4 14:49:38 2008 @@ -106,7 +106,6 @@ <screen name="EditExampleFeatureAppls"> <section> <actions> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/scriptaculous.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/prototype.js" global="true"/> <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/scriptaculouscontrols.css" global="true"/> @@ -125,4 +124,18 @@ </section> </screen> + <screen name="help"> + <section> + <actions> + <property-map resource="ExampleHelpUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <set field="layoutSettings.companyName" from-field="uiLabelMap.ExampleCompanyName" global="true"/> + </actions> + <widgets> + <include-screen name="help" location="component://common/widget/CommonScreens.xml"/> + </widgets> + </section> + </screen> + </screens> |
Free forum by Nabble | Edit this page |