Skip to content

Commit

Permalink
Code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramMaalej committed Jan 11, 2022
1 parent af00bbf commit 4afcd0a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public List<SelectItem> getAddableMetadata() {
* @throws InvalidMetadataValueException invalidMetadataValueException
*/
public void prepareAddableMetadataForStructure() throws InvalidMetadataValueException {
createProcessForm.getProcessMetadata().setSelectedMetadataTreeNode(null);
addableMetadata = DataEditorService.getAddableMetadataForStructureElement(
createProcessForm.getRulesetManagement().getStructuralElementView(
createProcessForm.getProcessDataTab().getDocType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,8 @@ public boolean canBeAdded(TreeNode treeNode) throws InvalidMetadataValueExceptio
if (Objects.nonNull(addMetadataDialog.getAddableMetadata())) {
return addMetadataDialog.getAddableMetadata().stream()
.map(SelectItem::getValue).collect(Collectors.toList()).contains(((ProcessDetail) treeNode.getData()).getMetadataID());
} else {
return false;
}
return false;
}

@Override
Expand Down
18 changes: 18 additions & 0 deletions Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,24 @@ Import form
width: calc(50% - var(--default-double-size) - 93px);
}

#editForm\:processFromTemplateTabView\:metadataTable tr.ui-widget-content:not([data-prk='root']) span > .ui-inputfield.hasDatepicker {
width: calc(50% - 4 * var(--default-half-size) - 93px - 39px);
}

#editForm\:processFromTemplateTabView\:metadataTable tr.ui-widget-content span > .ui-inputfield.hasDatepicker {
width: calc(50% - var(--default-half-size) - 93px - 39px);
}

#editForm\:processFromTemplateTabView\:metadataTable div.ui-selectmanymenu + span,
#editForm\:processFromTemplateTabView\:metadataTable div.ui-selectmanymenu + span + span {
vertical-align: top;
}

#editForm\:processFromTemplateTabView\:metadataTable tr.ui-widget-content span > .ui-button.ui-datepicker-trigger {
margin-right: var(--default-half-size);
margin-left: 0;
}

#progressDialog {
overflow-y: hidden;
padding: var(--default-full-size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
update="addMetadataDialog"
immediate="true"
disabled="#{not CreateProcessForm.processMetadata.metadataAddableToStructureElement()}"
actionListener="#{CreateProcessForm.processMetadata.setSelectedMetadataTreeNode(null)}"
action="#{CreateProcessForm.addMetadataDialog.prepareAddableMetadataForStructure()}"
oncomplete="PF('addMetadataDialog').show();">
</p:commandButton>
Expand Down

0 comments on commit 4afcd0a

Please sign in to comment.