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/StatusComposite.java
178 178
    }
179 179

  
180 180

  
181
//    public void setTaxaTableEnabled(boolean enabled) {
182
//        taxaTreeTable.setEnabled(enabled);
183
//    }
184
//
185
//    public void setTaxaTableSelectable(boolean isTaxaTableSelectable) {
186
//        taxaTreeTable.setSelectable(isTaxaTableSelectable);
187
//    }
188

  
189 181
    public TreeTable getTaxaTreeTable() {
190 182
        return taxaTreeTable;
191 183
    }
......
235 227
                    if(source.getItem(itemId) == null) {
236 228
                        return null;
237 229
                    }
238
                    Property hasSynProperty = source.getItem(itemId).getItemProperty(LeafNodeTaxonContainer.HAS_SYN_ID);
239
                    if(hasSynProperty == null) {
230
                    if(listener.isSynonym(itemId)) {
240 231
                        // this is a synonym, so we activate the corresponding css class
241 232
                        return "synonym";
233
                    } else {
234
                        return "taxon";
242 235
                    }
243
                    return null;
236

  
244 237
                }
245 238
            });
246 239

  
247

  
240
            taxaTreeTable.setSortContainerPropertyId(LeafNodeTaxonContainer.NAME_ID);
248 241

  
249 242
            // NOTE : Not really sure why we need to refresh the container here.
250 243
            // in the case of 'Table' this is not required
......
426 419
            public void itemClick(ItemClickEvent event) {
427 420
                Object itemId = event.getItemId();
428 421
                if(taxaTreeTable.isSelectable()) {
429
                    if(!listener.isSynonym(itemId)) {
422
                    if(!CdmVaadinUtilities.isSelected(taxaTreeTable, itemId) && !listener.isSynonym(itemId)) {
430 423
                        UUID taxonUuid = listener.getCurrentLeafNodeTaxonContainer().getUuid(itemId);
431 424
                        String taxonName = (String)listener.getCurrentLeafNodeTaxonContainer().getProperty(itemId, LeafNodeTaxonContainer.NAME_ID).getValue();
432 425
                        Object idUuidName = new IdUuidName(itemId, taxonUuid, taxonName);

Also available in: Unified diff