Project

General

Profile

Revision 29e04c71

ID29e04c71e2d62b11aee80699d641fcdc7d7a9754
Parent 3264654b
Child 0b673f50

Added by Andreas Kohlbecker over 3 years ago

fitering TaxonEditorModes before passing to basionym editor

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNameEditorPresenter.java
366 366
        basionymNamePopup = getNavigationManager().showInPopup(TaxonNamePopupEditor.class, getView());
367 367
        basionymNamePopup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
368 368
        basionymNamePopup.withDeleteButton(true);
369
        getView().getModesActive().forEach(m -> basionymNamePopup.enableMode(m));
369
        getView().getModesActive().stream()
370
                .filter(
371
                        m -> !TaxonNamePopupEditorMode.nomenclaturalReferenceSectionEditingOnly.equals(m))
372
                .forEach(m -> basionymNamePopup.enableMode(m));
370 373
        basionymNamePopup.loadInEditor(event.getEntityId());
371 374
        basionymNamePopup.getBasionymToggle().setVisible(false);
372 375

  
373 376
    }
374 377

  
375 378
    @EventBusListenerMethod(filter = EditorActionTypeFilter.Add.class)
376
    public void onReferenceEditorActionAdd(TaxonNameEditorAction event) {
379
    public void oTaxonNameEditorActionAdd(TaxonNameEditorAction event) {
377 380

  
378 381
        if(getView() == null || event.getSourceView() != getView() ){
379 382
            return;
......
384 387
        basionymNamePopup = getNavigationManager().showInPopup(TaxonNamePopupEditor.class, getView());
385 388
        basionymNamePopup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
386 389
        basionymNamePopup.withDeleteButton(true);
390
        getView().getModesActive().stream()
391
                .filter(
392
                        m -> !TaxonNamePopupEditorMode.nomenclaturalReferenceSectionEditingOnly.equals(m))
393
                .forEach(m -> basionymNamePopup.enableMode(m));
387 394
        basionymNamePopup.loadInEditor(null);
388 395
        basionymNamePopup.getBasionymToggle().setVisible(false);
389 396
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)