Project

General

Profile

« Previous | Next » 

Revision 21a1bf2d

Added by Cherian Mathew almost 9 years ago

EditConceptRelationshipComposite, EditConceptRelationshipPresenter : hack for checking relationship rules (currently only for congruence)
INewTaxonBaseComponentListener, NewTaxonBaseComposite, NewTaxonBasePresenter : Setting default secundum when addin taxon / synonym
StatusComposite, ConceptRelationshipView : added check for already selected item in taxon table
CdmVaadinUtilities : added utility method to check if given item is selected
d3.conceptrelationshiptree_connector.js : cleaned up transition for nodes + removed transition for links
edit.scss, styles.css : added italics also for taxon

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/EditConceptRelationshipComposite.java
170 170
        this.window = window;
171 171
    }
172 172

  
173
    public boolean canCreateRelationship() {
174
        return presenter.canCreateRelationship(fromTaxonIun.getUuid());
175
    }
176

  
173 177
    private void initFromTaxon() {
174 178
        if(fromTaxonIun != null) {
175 179
            fromTaxonTextField.setReadOnly(false);
......
401 405

  
402 406
    private static void showInDialog(String windowTitle,
403 407
            EditConceptRelationshipComposite ecrc) {
408
        //FIXME : hack for the moment to demonstrate checking of concept relationship rules
409
        if(!ecrc.canCreateRelationship()) {
410
            Notification.show("Cannot create relationship for a taxon which is already congruent to another taxon", Type.WARNING_MESSAGE);
411
            return;
412
        }
404 413
        Window dialog = new Window(windowTitle);
405 414
        dialog.setModal(false);
406 415
        dialog.setClosable(false);

Also available in: Unified diff