Skip to content

Commit

Permalink
BibTeX information in web search import screen - add toggle button (J…
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMachiei committed Jan 16, 2024
1 parent 1cb357b commit 3e18d17
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Button onAction="#selectAllEntries" text="%Select all entries"/>
<Button onAction="#unselectAll" text="%Unselect all"/>
</HBox>
<VBox>
<VBox fx:id="bibTeXDataBox" visible="false" managed="false">
<Label text="%Entry BibTeX data:"/>
<CodeArea fx:id="bibTeXData" editable="false" minHeight="30.0" prefHeight="200.0" prefWidth="700.0" wrapText="true"/>
</VBox>
Expand All @@ -52,7 +52,10 @@
<Label fx:id="selectedItems" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
</GridPane>
</HBox>
<CheckBox fx:id="downloadLinkedOnlineFiles" text="%Download linked online files"/>
<HBox spacing="4">
<CheckBox fx:id="downloadLinkedOnlineFiles" text="%Download linked online files"/>
<CheckBox fx:id="showEntryInformation" text="%Show entry information"/>
</HBox>
</VBox>
</content>
<ButtonType fx:id="importButton" buttonData="OK_DONE" text="%Import entries"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public class ImportEntriesDialog extends BaseDialog<Boolean> {
public Label totalItems;
public Label selectedItems;
public CheckBox downloadLinkedOnlineFiles;
public CheckBox showEntryInformation;
public CodeArea bibTeXData;
public VBox bibTeXDataBox;
private final BackgroundTask<ParserResult> task;
private ImportEntriesViewModel viewModel;
@Inject private TaskExecutor taskExecutor;
Expand Down Expand Up @@ -202,6 +204,10 @@ private void displayBibTeX(BibEntry entry) {
private void initBibTeX(){
bibTeXData.setBorder(new Border(new BorderStroke(Color.GREY, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT)));
bibTeXData.setPadding(new Insets(5.0));
showEntryInformation.selectedProperty().addListener((observableValue, old_val, new_val) -> {
bibTeXDataBox.setVisible(new_val);
bibTeXDataBox.setManaged(new_val);
});
}

private String getSourceString(BibEntry entry) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,7 @@ Selected\ items\:=Selected items:
Download\ linked\ online\ files=Download linked online files
Select\ the\ entries\ to\ be\ imported\:=Select the entries to be imported\:
Entry\ BibTeX\ data\:=Entry BibTeX data\:
Show\ entry\ information=Show entry information
Add\ new\ String=Add new String
Must\ not\ be\ empty\!=Must not be empty\!
Open\ Help\ page=Open Help page
Expand Down

0 comments on commit 3e18d17

Please sign in to comment.