Skip to content
2 changes: 1 addition & 1 deletion src/main/webapp/dataverse_template.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<ui:fragment rendered="#{!empty settingsWrapper.get(':StyleCustomizationFile')}">
<style>
/* Custom CSS */
<o:resourceInclude path="/CustomizationFilesServlet?customFileType=style" />
<![CDATA[<o:resourceInclude path="/CustomizationFilesServlet?customFileType=style" />]]>
</style>
</ui:fragment>
</h:head>
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/editdatafiles.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:pt="http://java.sun.com/jsf/passthrough"
xmlns:cc="http://java.sun.com/jsf/composite"
xmlns:o="http://omnifaces.org/ui"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
xmlns:o="http://omnifaces.org/ui">
<h:head>
</h:head>

<h:body>
<h:body xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
<ui:composition template="/dataverse_template.xhtml">
<ui:param name="pageTitle" value="#{datasetPage || EditDatafilesPage.showFileUploadFragment() ? (EditDatafilesPage.mode == 'REPLACE' ? bundle['file.replaceFile'] : bundle['file.uploadFiles']) : bundle['file.editFiles']} - #{EditDatafilesPage.workingVersion.title}"/>
<ui:param name="dataverse" value="#{EditDatafilesPage.dataset.owner}"/>
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/file.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:pt="http://java.sun.com/jsf/passthrough"
xmlns:cc="http://java.sun.com/jsf/composite"
xmlns:o="http://omnifaces.org/ui"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
xmlns:o="http://omnifaces.org/ui">
<h:head>
</h:head>

<h:body>
<h:body xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
<ui:composition template="/dataverse_template.xhtml">
<ui:param name="pageTitle" value="#{FilePage.fileMetadata.dataFile.displayName} - #{FilePage.file.owner.owner.displayName}"/>
<ui:param name="dataverse" value="#{FilePage.file.owner.owner}"/>
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/permissions-manage-files.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:o="http://omnifaces.org/ui"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
xmlns:jsf="http://xmlns.jcp.org/jsf">
<h:head>
</h:head>
<h:body>
<h:body xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
<f:metadata>
<f:viewParam name="id" value="#{manageFilePermissionsPage.dataset.id}"/>
<f:viewAction action="#{dataverseSession.updateLocaleInViewRoot}"/>
Expand Down
5 changes: 2 additions & 3 deletions src/main/webapp/permissions-manage.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
</h:head>

<h:body>
<h:body xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
<f:metadata>
<f:viewParam name="id" value="#{managePermissionsPage.dvObject.id}"/>
<f:viewAction action="#{dataverseSession.updateLocaleInViewRoot}"/>
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/resources/js/fileupload.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function cancelDatasetEdit() {

var inDataverseCall = false;

class fileUpload {
var fileUpload = class fileUploadClass {
constructor(file) {
this.file = file;
this.state = UploadState.QUEUED;
Expand Down Expand Up @@ -549,8 +549,9 @@ async function uploadFailure(jqXHR, upid, filename) {
id = arguments.callee.caller.caller.arguments[1].files[0].row[0].attributes.upid.value;
status = arguments.callee.caller.caller.arguments[1].jqXHR.status;
statusText = arguments.callee.caller.caller.arguments[1].jqXHR.statusText;
} catch {
} catch(err) {
console.log("Unable to determine status for error - assuming network issue");
console.log("Exception: " + err.message);
}
}

Expand Down
12 changes: 10 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/export/DDIExporterTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edu.harvard.iq.dataverse.export;

import com.google.gson.Gson;
import com.google.gson.*;
import edu.harvard.iq.dataverse.ControlledVocabularyValue;
import edu.harvard.iq.dataverse.DatasetFieldType;
import edu.harvard.iq.dataverse.DatasetFieldType.FieldType;
Expand All @@ -17,10 +17,15 @@
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
Expand All @@ -42,7 +47,10 @@ public class DDIExporterTest {
private static final SettingsServiceBean settingsService = Mockito.mock(SettingsServiceBean.class);
private static final LicenseServiceBean licenseService = Mockito.mock(LicenseServiceBean.class);
private static final MockDatasetFieldSvc datasetFieldTypeSvc = new MockDatasetFieldSvc();
private static final Gson gson = new Gson();
private static final Gson gson = new GsonBuilder().registerTypeAdapter(LocalDate.class, (JsonDeserializer<LocalDateTime>) (JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) -> {
Instant instant = Instant.ofEpochMilli(json.getAsJsonPrimitive().getAsLong());
return LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
}).create();

/*
* Setup and teardown mocks for BrandingUtil for atomicity.
Expand Down