Skip to content

Commit

Permalink
Merge branch 'master' into focus-new-metadata-fields-in-metadata-edit…
Browse files Browse the repository at this point in the history
…or-fixes-5929
  • Loading branch information
thomaslow committed Nov 5, 2024
2 parents 6518eb3 + 3d32ea1 commit dd27068
Show file tree
Hide file tree
Showing 18 changed files with 961 additions and 208 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* (c) Kitodo. Key to digital objects e. V. <contact@kitodo.org>
*
* This file is part of the Kitodo project.
*
* It is licensed under GNU General Public License version 3 or later.
*
* For the full copyright and license information, please read the
* GPL3-License.txt file that was distributed with this source code.
*/

package org.kitodo.production.forms.dataeditor;

import java.util.Objects;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
* Bean that is used in externalView.xhtml.
*/
@Named("ExternalView")
@RequestScoped
public class ExternalView {

/**
* Return the shortened ID of the media by removing leading zeros.
*
* @param id the long id of the media file as string
* @return the shortened id of the media file
*/
public static String convertToShortId(String id) {
if (Objects.nonNull(id)) {
return id.replaceFirst("^0+(?!$)", "");
} else {
return "-";
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ private void selectMedia(String physicalDivisionOrder, String stripeIndex, Strin
String scrollScripts = "scrollToSelectedTreeNode();scrollToSelectedPaginationRow();";
if (GalleryViewMode.PREVIEW.equals(galleryViewMode)) {
PrimeFaces.current().executeScript(
"checkScrollPosition();initializeImage();metadataEditor.gallery.mediaView.update();" + scrollScripts);
"checkScrollPosition();metadataEditor.detailMap.update();metadataEditor.gallery.mediaView.update();" + scrollScripts);
} else {
PrimeFaces.current().executeScript(scrollScripts);
}
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ validator={0}-Bilder validieren
value=Wert
video=Video
view=Anzeigen
viewPageInNewWindow=Seite in neuem Browser-Fenster öffnen
visible=Sichtbar
volume=Band
of=von
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ validator=Validate {0} images
value=Value
video=Video
view=View
viewPageInNewWindow=View page in new browser window
visible=Visible
volume=volume
of=of
Expand Down
2 changes: 2 additions & 0 deletions Kitodo/src/main/resources/messages/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,8 @@ validator=Validar {0}-imágenes
value=Valor
video=Video
view=Ver
# please check google translation below and remove comment if translation is acceptable
viewPageInNewWindow=Ver página en una nueva ventana del navegador
visible=Visible
volume=Banda
of=Desde
Expand Down
27 changes: 27 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 @@ -3370,6 +3370,9 @@ div[id$='metadataTable'].ui-treetable tr.focusedRow {
left: 16px;
position: absolute;
top: 16px;
display: flex;
flex-direction: column;
align-items: start;
}

#map .ol-overlaycontainer-stopevent > .ol-zoom.ol-unselectable.ol-control {
Expand All @@ -3391,6 +3394,7 @@ div[id$='metadataTable'].ui-treetable tr.focusedRow {
}

#map .ol-control {
display: inline-block;
background: transparent;
padding: 0;
position: static;
Expand Down Expand Up @@ -3825,6 +3829,29 @@ kbd {
padding: 0 var(--default-half-size);
}

#externalViewTitle {
color: var(--pure-white);
line-height: 1.5em;
}

#externalViewPanel {
margin: auto 16px;
}

#externalViewPanel, #externalViewPanel_content {
padding: 0;
height: 100%;
overflow: hidden;
}

#externalViewPanel #imagePreviewForm\:mediaDetailMediaContainer {
height: 100%;
}

#externalViewPanel video {
max-height: 90%;
}

/*----------------------------------------------------------------------
Workflow Editor
----------------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/*eslint new-cap: ["error", { "capIsNewExceptionPattern": "^PF" }]*/
/*eslint complexity: ["error", 10]*/

var metadataEditor = {};
var metadataEditor = metadataEditor || {};

metadataEditor.metadataTree = {

Expand Down Expand Up @@ -1147,7 +1147,7 @@ metadataEditor.shortcuts = {
case "PREVIEW":
initialize();
scrollToSelectedThumbnail();
changeToMapView();
metadataEditor.detailMap.update();
break;
}
}
Expand Down
Loading

0 comments on commit dd27068

Please sign in to comment.