Author: jacopoc
Date: Tue Jul 15 09:42:20 2008 New Revision: 676959 URL: http://svn.apache.org/viewvc?rev=676959&view=rev Log: Applied patch contributed by Bilgin Ibryam in OFBIZ-1877: definitio of a common menu that can be extended by the application (the menu already contains the main and login/logout items). A few applications have been updated to use it as well. Added: ofbiz/trunk/framework/common/widget/CommonMenus.xml (with props) Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml ofbiz/trunk/applications/humanres/widget/Menus.xml ofbiz/trunk/applications/marketing/widget/MarketingMenus.xml ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml ofbiz/trunk/specialpurpose/bi/widget/BiMenus.xml ofbiz/trunk/specialpurpose/oagis/widget/Menus.xml ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Tue Jul 15 09:42:20 2008 @@ -19,9 +19,7 @@ --> <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="ContentAppBar" default-menu-item-name="main" id="app-navigation" title="${uiLabelMap.ContentContentManagerApplication}" - default-selected-style="selected" type="simple" selected-menuitem-context-field-name="headerItem"> - <menu-item name="main" title="${uiLabelMap.ContentMain}"><link target="main"/></menu-item> + <menu name="ContentAppBar" title="${uiLabelMap.ContentContentManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="websites" title="${uiLabelMap.ContentWebSites}"><link target="FindWebSite"/></menu-item> <menu-item name="survey" title="${uiLabelMap.ContentSurvey}"><link target="FindSurvey"/></menu-item> <menu-item name="Forum" title="${uiLabelMap.ContentForum}"><link target="findForumGroups"/></menu-item> @@ -32,15 +30,6 @@ <menu-item name="Layout" title="${uiLabelMap.ContentTemplate}"><link target="LayoutMenu"/></menu-item> <menu-item name="CMS" title="${uiLabelMap.ContentCMS}"><link target="CMSContentFind"/></menu-item> <menu-item name="CompDoc" title="${uiLabelMap.ContentCompDoc}"><link target="FindCompDoc"/></menu-item> - - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> <menu name="content" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="HAS_AUTHOR_ROLE|CONTENT_ADMIN" Modified: ofbiz/trunk/applications/humanres/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/Menus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/Menus.xml (original) +++ ofbiz/trunk/applications/humanres/widget/Menus.xml Tue Jul 15 09:42:20 2008 @@ -20,9 +20,7 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="HumanResAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.HumanResManagerApplication}" - default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem"> - <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> + <menu name="HumanResAppBar" title="${uiLabelMap.HumanResManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="Employment" title="${uiLabelMap.HumanResEmployment}"><link target="FindEmployments"/></menu-item> <menu-item name="Employee" title="${uiLabelMap.HumanResEmployee}"><link target="findEmployees"/></menu-item> <menu-item name="EmplPosition" title="${uiLabelMap.HumanResEmployeePosition}"><link target="FindEmplPositions"/></menu-item> @@ -34,14 +32,6 @@ <menu-item name="PayGrade" title="${uiLabelMap.HumanResPayGrade}"><link target="FindPayGrades"/></menu-item> <menu-item name="PerfReview" title="${uiLabelMap.HumanResPerfReview}"><link target="FindPerfReviews"/></menu-item> <menu-item name="Leave" title="${uiLabelMap.HumanResEmplLeave}"><link target="FindEmplLeaves"/></menu-item> - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> <menu-item name="GlobalHRSettings" title="${uiLabelMap.HumanResGlobalHRSettings}" selected-style="selected"><link target="globalHRSettings"/></menu-item> </menu> <menu name="EmploymentBar" default-menu-item-name="EditPartyBenefit" default-selected-style="selected" Modified: ofbiz/trunk/applications/marketing/widget/MarketingMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/MarketingMenus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/MarketingMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/MarketingMenus.xml Tue Jul 15 09:42:20 2008 @@ -18,22 +18,12 @@ under the License. --> <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="MarketingAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.MarketingManagerApplication}" - default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem"> - <menu-item name="main" title="${uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item> + <menu name="MarketingAppBar" title="${uiLabelMap.MarketingManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="DataSource" title="${uiLabelMap.DataSource}"><link target="FindDataSource"/></menu-item> <menu-item name="Campaign" title="${uiLabelMap.MarketingCampaign}"><link target="FindMarketingCampaign"/></menu-item> <menu-item name="Tracking" title="${uiLabelMap.Tracking}"><link target="FindTrackingCode"/></menu-item> <menu-item name="Segment" title="${uiLabelMap.Segment}"><link target="FindSegmentGroup"/></menu-item> <menu-item name="ContactList" title="${uiLabelMap.ContactList}"><link target="FindContactLists"/></menu-item> <menu-item name="Reports" title="${uiLabelMap.MarketingReports}"><link target="MarketingReport"/></menu-item> - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> </menus> \ No newline at end of file Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Tue Jul 15 09:42:20 2008 @@ -18,9 +18,7 @@ under the License. --> <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="SfaAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.SfaManagerApplication}" - default-selected-style="selected" menu-container-style="button-bar tab-bar no-clear" selected-menuitem-context-field-name="headerItem"> - <menu-item name="Main" title="${uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item> + <menu name="SfaAppBar" title="${uiLabelMap.SfaManagerApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="Accounts" title="${uiLabelMap.SfaAcccounts}"><link target="FindAccounts"/></menu-item> <menu-item name="Contacts" title="${uiLabelMap.SfaContacts}"><link target="FindContacts"/></menu-item> <menu-item name="Leads" title="${uiLabelMap.SfaLeads}"><link target="FindLeads"/></menu-item> @@ -29,14 +27,6 @@ <menu-item name="Documents" title="${uiLabelMap.SfaDocuments}"><link target=""/></menu-item> <menu-item name="Forecast" title="${uiLabelMap.SfaForecasts}"><link target="FindSalesForecast"/></menu-item> <menu-item name="Opportunities" title="${uiLabelMap.SfaOpportunities}"><link target="FindOpportunity"/></menu-item> - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> <menu name="OpportunityTabBar" type="simple" menu-container-style="button-bar tab-bar no-clear" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem"> Added: ofbiz/trunk/framework/common/widget/CommonMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonMenus.xml?rev=676959&view=auto ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonMenus.xml (added) +++ ofbiz/trunk/framework/common/widget/CommonMenus.xml Tue Jul 15 09:42:20 2008 @@ -0,0 +1,34 @@ +<?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. +--> + +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> + <menu name="CommonAppBarMenu" default-menu-item-name="main" id="app-navigation" type="simple" + default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem"> + <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> + <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> + <condition><not><if-empty field-name="userLogin"/></not></condition> + <link target="logout"/> + </menu-item> + <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> + <condition><if-empty field-name="userLogin"/></condition> + <link target="${checkLoginUrl}"/> + </menu-item> + </menu> +</menus> Propchange: ofbiz/trunk/framework/common/widget/CommonMenus.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/common/widget/CommonMenus.xml ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/trunk/framework/common/widget/CommonMenus.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml Tue Jul 15 09:42:20 2008 @@ -21,21 +21,11 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="ExampleAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.ExampleApplication}" - default-selected-style="selected" selected-menuitem-context-field-name="headerItem"> - <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> + <menu name="ExampleAppBar" title="${uiLabelMap.ExampleApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="Example" title="${uiLabelMap.ExampleExample}"><link target="FindExample"/></menu-item> <menu-item name="ExampleFeature" title="${uiLabelMap.ExampleFeature}"><link target="FindExampleFeature"/></menu-item> <menu-item name="FormWidgetExamples" title="${uiLabelMap.ExampleFormWidgetExamples}"><link target="FormWidgetExamples"/></menu-item> <menu-item name="AjaxExample" title="Ajax Examples"><link target="authview/findExampleAjax"/></menu-item> - <menu-item name="Logout" title="Logout" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="Login" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> <menu name="EditExample" default-selected-style="selected" type="simple" Modified: ofbiz/trunk/specialpurpose/bi/widget/BiMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/bi/widget/BiMenus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/bi/widget/BiMenus.xml (original) +++ ofbiz/trunk/specialpurpose/bi/widget/BiMenus.xml Tue Jul 15 09:42:20 2008 @@ -18,18 +18,7 @@ under the License. --> <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="BiAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.BusinessIntelligenceApplication}" - default-selected-style="selected" selected-menuitem-context-field-name="headerItem"> - <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> + <menu name="BiAppBar" title="${uiLabelMap.BusinessIntelligenceApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="reportbuilder" title="${uiLabelMap.BusinessIntelligenceReportBuilder}"><link target="ReportBuilderSelectStarSchema"/></menu-item> - - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> </menus> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/oagis/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/widget/Menus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/oagis/widget/Menus.xml Tue Jul 15 09:42:20 2008 @@ -20,20 +20,9 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="OagisAppBar" default-menu-item-name="task" id="app-navigation" type="simple" selected-menuitem-context-field-name="headerItem" - default-selected-style="selected" title="${uiLabelMap.OagisApplication}"> - - <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> + <menu name="OagisAppBar" title="${uiLabelMap.OagisApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> <menu-item name="MessageInfos" title="${uiLabelMap.OagisMessageInfo}"><link target="FindMessageInfo"/></menu-item> <menu-item name="MessageErrorInfos" title="${uiLabelMap.OagisMessageErrorInfo}"><link target="FindMessageErrorInfo"/></menu-item> - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> </menus> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml?rev=676959&r1=676958&r2=676959&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/Menus.xml Tue Jul 15 09:42:20 2008 @@ -20,9 +20,8 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> - <menu name="ProjectMgrAppBar" id="app-navigation" type="simple" selected-menuitem-context-field-name="headerItem" default-selected-style="selected" title="${uiLabelMap.ProjectMgrApplication}" menu-container-style="button-bar tab-bar"> + <menu name="ProjectMgrAppBar" title="${uiLabelMap.ProjectMgrApplication}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> - <menu-item name="main" title="${uiLabelMap.CommonMain}"><link target="main"/></menu-item> <menu-item name="mytasks" title="${uiLabelMap.WorkEffortMyTasks}"><link target="MyTasks"/></menu-item> <menu-item name="mytime" title="${uiLabelMap.TimesheetMyTime}"><link target="MyTimesheet"/></menu-item> <menu-item name="projects" title="${uiLabelMap.WorkEffortProjects}"><link target="FindProject"/></menu-item> @@ -56,14 +55,6 @@ <menu-item name="help" title="${uiLabelMap.CommonHelp}" align-style="opposed"> <link target="http://docs.ofbiz.org/display/OFBENDUSER/Project+Manager+Application+Roles?decorator=printable" url-mode="plain" target-window="new"/> </menu-item> - <menu-item name="Logout" title="${uiLabelMap.CommonLogout}" align-style="opposed"> - <condition><not><if-empty field-name="userLogin"/></not></condition> - <link target="logout"/> - </menu-item> - <menu-item name="Login" title="${uiLabelMap.CommonLogin}" align-style="opposed"> - <condition><if-empty field-name="userLogin"/></condition> - <link target="${checkLoginUrl}"/> - </menu-item> </menu> <menu name="ProjectTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem"> <actions> |
Free forum by Nabble | Edit this page |