Skip to content

Commit

Permalink
Fix bugs reported in review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramMaalej committed Feb 9, 2022
1 parent 9359a40 commit 74ab0e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,8 @@ public void removeBlock(Block block) {
*/
public void addIssue(Block block) {
if (Objects.nonNull(block)) {
Issue issue = block.addIssue();
block.addIssue();
block.checkIssuesWithSameHeading();
}
}

Expand Down Expand Up @@ -919,11 +920,13 @@ public String getMetadataValue(ProcessDetail processDetail) {
*/
public void checkDuplicatedTitles() throws ProcessGenerationException, DataException, DAOException,
ConfigurationException, IOException, DoctypeMissingException {
Process process = ServiceManager.getProcessService().getById(parentId);
NewspaperProcessesGenerator newspaperProcessesGenerator = new NewspaperProcessesGenerator(process, course);
newspaperProcessesGenerator.initialize();
if (!newspaperProcessesGenerator.isDuplicatedTitles()) {
PrimeFaces.current().executeScript("PF('createProcessesConfirmDialog').show();");
if (course.parallelStream().noneMatch(block -> Objects.equals(block.checkIssuesWithSameHeading(), true))) {
Process process = ServiceManager.getProcessService().getById(parentId);
NewspaperProcessesGenerator newspaperProcessesGenerator = new NewspaperProcessesGenerator(process, course);
newspaperProcessesGenerator.initialize();
if (!newspaperProcessesGenerator.isDuplicatedTitles()) {
PrimeFaces.current().executeScript("PF('createProcessesConfirmDialog').show();");
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Kitodo/src/main/resources/messages/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ calendar.issue.add=Ausgabe hinzuf\u00FCgen
calendar.issue.delete=Ausgabe l\u00F6schen
calendar.issue.delete.query=Wollen Sie die Augabe l\u00F6schen?
calendar.jumpToDay=Zu Tag springen
calendar.metadata.global.add=Metadatum allen Ausgaben hinzuf\u00FC</h4>gen
calendar.metadata.global.add=Metadatum allen Ausgaben hinzuf\u00FCgen
calendar.metadata.issue.add=Metadatum hinzuf\u00FCgen
calendar.metadata.global.add.tooltip=Metadatum zu allen erschienen Ausgaben hinzuf\u00FCgen
calendar.metadata.issue.add.tooltip=Metadatum zu allen erschienen Ausgaben ab dieser hinzuf\u00FCgen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
title="#{metadata.metadataDetail.value}">
<p:spinner id="spinner"
value="#{metadata.metadataDetail.value}">
<p:ajax event="blur"/>
<p:ajax event="blur" update="calendarDayForm"/>
</p:spinner>
</h:panelGroup>
<h:panelGroup rendered="#{metadata.metadataDetail.input eq 'calendar'}">
Expand All @@ -162,15 +162,15 @@
pattern="yyyy-MM-dd"
styleClass="input-with-button"
showOn="button">
<p:ajax event="dateSelect"/>
<p:ajax event="dateSelect" update="calendarDayForm"/>
</p:calendar>
</h:panelGroup>
<h:panelGroup rendered="#{metadata.metadataDetail.input eq 'manyMenu'}">
<p:selectManyMenu id="selectManyMenu"
value="#{metadata.metadataDetail.selectedItems}"
showCheckbox="true">
<f:selectItems value="#{metadata.metadataDetail.items}"/>
<p:ajax event="change"/>
<p:ajax event="change" update="calendarDayForm"/>
</p:selectManyMenu>
</h:panelGroup>
<h:panelGroup rendered="#{metadata.metadataDetail.input eq 'oneMenu'}"
Expand All @@ -182,7 +182,7 @@
itemLabel="#{msgs.notSelected}"
noSelectionOption="true"/>
<f:selectItems value="#{metadata.metadataDetail.items}"/>
<p:ajax event="change"/>
<p:ajax event="change" update="calendarDayForm"/>
</p:selectOneMenu>
</h:panelGroup>
<h:panelGroup rendered="#{metadata.metadataDetail.input eq 'oneRadio'}">
Expand All @@ -191,14 +191,14 @@
layout="grid"
columns="1">
<f:selectItems value="#{metadata.metadataDetail.items}"/>
<p:ajax/>
<p:ajax update="calendarDayForm"/>
</p:selectOneRadio>
</h:panelGroup>
<h:panelGroup rendered="#{metadata.metadataDetail.input eq 'toggleSwitch'}"
title="#{metadata.metadataDetail.active.toString()}">
<p:selectBooleanCheckbox id="selectBooleanCheckbox"
value="#{metadata.metadataDetail.active}">
<p:ajax event="change"/>
<p:ajax event="change" update="calendarDayForm"/>
</p:selectBooleanCheckbox>
</h:panelGroup>

Expand Down

0 comments on commit 74ab0e4

Please sign in to comment.