# HG changeset patch # User Raimund Renkert # Date 1331652607 0 # Node ID ec120dc6279b89b3fdbbf3c0190667456f4629dc # Parent 0235cdb62c981a4a196d9d76de45fdc3f6bc279d Issue 616. Deactivate synchron navigation item in context menu for all themes except of cross sections. flys-client/trunk@4138 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 0235cdb62c98 -r ec120dc6279b flys-client/ChangeLog --- a/flys-client/ChangeLog Thu Mar 08 15:39:29 2012 +0000 +++ b/flys-client/ChangeLog Tue Mar 13 15:30:07 2012 +0000 @@ -1,3 +1,11 @@ +2012-03-13 Raimund Renkert + + Issue 616. + + * src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java: + Only append the synchron navigation item to context menu if the theme + is a cross section. + 2012-03-08 Raimund Renkert Issue 563. diff -r 0235cdb62c98 -r ec120dc6279b flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Thu Mar 08 15:39:29 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Tue Mar 13 15:30:07 2012 +0000 @@ -655,22 +655,27 @@ protected Menu getSingleContextMenu(final ListGridRecord[] records) { Menu contextMenu = super.getSingleContextMenu(records); - // Synchron checking. - MenuItem synchronNavigationMenuItem = new MenuItem(); - if (synchronNavigation == true) { - // TODO i18n - synchronNavigationMenuItem.setTitle("Einzeln navigieren"); + Theme facetTheme = ((FacetRecord)records[0]).getTheme(); + String item = facetTheme.getFacet(); + + if(item.equals("cross_section")) { + // Synchron checking. + MenuItem synchronNavigationMenuItem = new MenuItem(); + if (synchronNavigation == true) { + // TODO i18n + synchronNavigationMenuItem.setTitle("Einzeln navigieren"); + } + else { + // TODO i18n + synchronNavigationMenuItem.setTitle("Synchron navigieren"); + } + synchronNavigationMenuItem.addClickHandler(new ClickHandler() { + public void onClick(MenuItemClickEvent evt) { + synchronNavigation = !synchronNavigation; + } + }); + contextMenu.addItem(synchronNavigationMenuItem); } - else { - // TODO i18n - synchronNavigationMenuItem.setTitle("Synchron navigieren"); - } - synchronNavigationMenuItem.addClickHandler(new ClickHandler() { - public void onClick(MenuItemClickEvent evt) { - synchronNavigation = !synchronNavigation; - } - }); - contextMenu.addItem(synchronNavigationMenuItem); return contextMenu; }