Project

General

Profile

Revision 761df07f

ID761df07f504b163b2bc7b46d78fb04ed7a66150e
Parent f7882bff
Child 7fa05bfe

Added by Andreas Kohlbecker over 2 years ago

ref #7223 fixing most severe layout issues

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/reference/ReferencePopupEditor.java
55 55

  
56 56
    private TextField titleField;
57 57

  
58
    private final static int GRID_COLS = 4;
58
    private final static int GRID_COLS = 4; // 12 would fits for 2,3, and 4 Components per row
59 59

  
60 60
    private final static int GRID_ROWS = 10;
61 61

  
......
117 117
        "inReference"
118 118
         */
119 119
        int row = 0;
120
        VerbatimTimePeriodField timePeriodField = new VerbatimTimePeriodField("Date published");
121
        addField(timePeriodField, "datePublished", 0, row, 1, row);
120 122
        typeSelect = new ListSelect("Reference type");
121 123
        typeSelect.addItems(referenceTypes);
122 124
        typeSelect.setNullSelectionAllowed(false);
123 125
        typeSelect.setRows(1);
124 126
        typeSelect.addValueChangeListener(e -> updateFieldVisibility((ReferenceType)e.getProperty().getValue()));
125
        addField(typeSelect, "type", 3, row);
127
        addField(typeSelect, "type", GRID_COLS - 1, row);
126 128
        grid.setComponentAlignment(typeSelect, Alignment.TOP_RIGHT);
127 129
        row++;
128 130

  
......
142 144

  
143 145
        authorshipField = new TeamOrPersonField("Author(s)", TeamOrPersonBaseCaptionGenerator.CacheType.BIBLIOGRAPHIC_TITLE);
144 146
        authorshipField.setWidth(100,  Unit.PERCENTAGE);
145
        addField(authorshipField, "authorship", 0, row, 3, row);
147
        addField(authorshipField, "authorship", 0, row, GRID_COLS -1, row);
146 148
        row++;
147 149

  
148 150
        inReferenceCombobox = new ToOneRelatedEntityCombobox<Reference>("In-reference", Reference.class);
......
162 164
                );
163 165
            }
164 166
            });
165
        addField(inReferenceCombobox, "inReference", 0, row, 3, row);
167
        addField(inReferenceCombobox, "inReference", 0, row, GRID_COLS -1, row);
166 168
        row++;
167 169

  
168
        addTextField("Series", "seriesPart", 0, row);
169
        addTextField("Volume", "volume", 1, row);
170
        addTextField("Pages", "pages", 2, row);
171
        addTextField("Editor", "editor", 3, row).setWidth(100, Unit.PERCENTAGE);
170
        addTextField("Series", "seriesPart", 0, row).setWidth(100, Unit.PERCENTAGE);
171
        addTextField("Volume", "volume", 1, row).setWidth(100, Unit.PERCENTAGE);
172
        addTextField("Pages", "pages", 2, row).setWidth(100, Unit.PERCENTAGE);
173
        addTextField("Edition", "edition", 3, row).setWidth(100, Unit.PERCENTAGE);
172 174
        row++;
173 175

  
174
        addTextField("Place published", "placePublished", 0, row, 1, row).setWidth(100, Unit.PERCENTAGE);
175
        TextField publisherField = addTextField("Publisher", "publisher", 2, row, 3, row);
176
        addTextField("Place published", "placePublished", 0, row, 0, row).setWidth(100, Unit.PERCENTAGE);
177
        TextField publisherField = addTextField("Publisher", "publisher", 1, row, 1, row);
176 178
        publisherField.setWidth(100, Unit.PERCENTAGE);
177
        VerbatimTimePeriodField timePeriodField = new VerbatimTimePeriodField("Date published");
178
        addField(timePeriodField, "datePublished");
179
        addTextField("Editor", "editor", 2, row).setWidth(100, Unit.PERCENTAGE);
179 180
        row++;
180 181

  
181
        addTextField("ISSN", "issn", 0, row);
182
        addTextField("ISBN", "isbn", 1, row);
182
        addTextField("ISSN", "issn", 0, row).setWidth(100, Unit.PERCENTAGE);
183
        addTextField("ISBN", "isbn", 1, row).setWidth(100, Unit.PERCENTAGE);
183 184
        TextFieldNFix doiField = new TextFieldNFix("DOI");
184 185
        doiField.setConverter(new DoiConverter());
186
        doiField.setWidth(100, Unit.PERCENTAGE);
185 187
        addField(doiField, "doi", 2, row);
186 188
        TextFieldNFix uriField = new TextFieldNFix("Uri");
187 189
        uriField.setConverter(new UriConverter());
190
        uriField.setWidth(100, Unit.PERCENTAGE);
188 191
        addField(uriField, "uri", 3, row);
189 192

  
190 193
//        titleField.setRequired(true);
......
225 228
            getField("inReference").setCaption(propertyNameLabelMap.get("inReference"));
226 229
        }
227 230

  
231

  
232

  
228 233
        EnumSet<ReferenceType> hideNomTitle = EnumSet.of(ReferenceType.Article, ReferenceType.Section, ReferenceType.BookSection, ReferenceType.InProceedings, ReferenceType.PrintSeries);
229 234
        EnumSet<ReferenceType> hideTitle = EnumSet.of(ReferenceType.Section, ReferenceType.BookSection);
230 235
        getField("abbrevTitle").setVisible(!hideNomTitle.contains(value));

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)