Project

General

Profile

« Previous | Next » 

Revision 828e0012

Added by Katja Luther almost 3 years ago

ref #9373: adapt detail elements to enable/disable possibility of toggleable text fields

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java
36 36
import eu.etaxonomy.taxeditor.ui.element.VerbatimTimePeriodElement;
37 37
import eu.etaxonomy.taxeditor.ui.mvc.element.DateElement;
38 38
import eu.etaxonomy.taxeditor.ui.section.AbstractIdentifiableEntityDetailElement;
39
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
39 40
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
40 41

  
41 42
/**
......
72 73
	private EntitySelectionElement<Reference> selection_inReference;
73 74
	private EntitySelectionElement<Institution> selection_institution;
74 75
	private EnumComboElement<ReferenceType> combo_referenceType;
75

  
76
	private ExternalLinksSection externalLinks;
76 77
	private EntitySelectionElement<Reference> selection_inSeries;
77 78

  
78 79
    private void registerCacheElements() {
......
168 169
		}
169 170

  
170 171
		createUri(this, entity, SWT.NULL);
172

  
173
//		externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
174
//        externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
175
//        externalLinks.setEntity(entity);
176
//        externalLinks.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
177
//        externalLinks.setEmptySectionString("No links yet.");
178

  
171 179
		if(referenceType != null && (!referenceType.equals(ReferenceType.Journal) && !referenceType.equals(ReferenceType.PrintSeries) && !referenceType.equals(ReferenceType.PersonalCommunication))) {
172 180
            text_doi = formFactory.createDoiWithLabelElement(formElement, "DOI", entity.getDoi(), style);
173 181
        }
......
428 436
			getEntity().setSeriesPart(text_series.getText());
429 437
		} else if (eventSource == text_title ) {
430 438
			getEntity().setTitle(text_title.getText());
431
			if (!toggleable_cache.isEnabled()){
439
			if (!toggleable_cache.isCacheEnabled()){
432 440
			    toggleable_cache.setText(getEntity().generateTitle());
433 441
			}
434 442
		} else if (eventSource == text_abbrevTitle ) {
435 443
		    getEntity().setAbbrevTitle(text_abbrevTitle.getText());
436
		    if (!toggleableAbbrevCache.isEnabled()){
444
		    if (!toggleableAbbrevCache.isCacheEnabled()){
437 445
		        toggleableAbbrevCache.setText(getEntity().generateAbbrevTitle());
438 446
		    }
439 447
		} else if (eventSource == text_uri) {
......
444 452
			getEntity().setVolume(text_volume.getText());
445 453
		}else if (eventSource == text_doi) {
446 454
            getEntity().setDoi(text_doi.parseText());
447
        }else if (eventSource == text_accessed.getController()) {
455
        }else if (text_accessed != null && eventSource == text_accessed.getController()) {
448 456
            getEntity().setAccessed(text_accessed.getController().getDateTime());
449 457
        }
450 458

  

Also available in: Unified diff