getLastFiles(@ModelAttribute("userEppn") String user
@PreAuthorize("@preAuthorizeService.documentCreator(#documentId, #authUserEppn)")
@ResponseBody
@PostMapping(value = "/remove-doc/{documentId}", produces = MediaType.APPLICATION_JSON_VALUE)
- public String removeDocument(@ModelAttribute("authUserEppn") String authUserEppn, @PathVariable("documentId") Long documentId) throws JSONException {
+ public String removeDocument(@ModelAttribute("authUserEppn") String authUserEppn, @PathVariable("documentId") Long documentId) {
logger.info("remove document " + documentId);
Document document = documentService.getById(documentId);
SignRequest signRequest = signRequestService.getById(document.getParentId());
signRequest.getOriginalDocuments().remove(document);
- return new JSONObject().toString();
+ return "{}";
}
@PreAuthorize("@preAuthorizeService.signRequestView(#id, #userEppn, #authUserEppn)")
diff --git a/src/main/resources/static/css/overrides.css b/src/main/resources/static/css/overrides.css
index e2d0ec436..13960c6dd 100644
--- a/src/main/resources/static/css/overrides.css
+++ b/src/main/resources/static/css/overrides.css
@@ -349,6 +349,10 @@ textarea:invalid {
display: none;
}
+.textWidgetAnnotation * {
+ font-size: calc(10px* var(--scale-factor)) !important;
+}
+
/*.textWidgetAnnotation textarea {*/
/* !*border: 1px solid black !important;*!*/
/* overflow: hidden;*/
diff --git a/src/main/resources/static/css/style.css b/src/main/resources/static/css/style.css
index 5c7774238..1244e122c 100644
--- a/src/main/resources/static/css/style.css
+++ b/src/main/resources/static/css/style.css
@@ -142,9 +142,9 @@ td {
#sidebar {
background: white;
- -moz-box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.3);
- -webkit-box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.3);
- box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 5px 4px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 5px 4px 4px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 5px 4px 4px rgba(0, 0, 0, 0.3);
}
.nav-tabs {
diff --git a/src/main/resources/static/fonts/LiberationSans-Regular.ttf b/src/main/resources/static/fonts/LiberationSans-Regular.ttf
index 59d2e251b..e6339859d 100644
Binary files a/src/main/resources/static/fonts/LiberationSans-Regular.ttf and b/src/main/resources/static/fonts/LiberationSans-Regular.ttf differ
diff --git a/src/main/resources/static/js/modules/ui/signrequests/SignPosition.js b/src/main/resources/static/js/modules/ui/signrequests/SignPosition.js
index 7e094dd5f..8c809bb0f 100644
--- a/src/main/resources/static/js/modules/ui/signrequests/SignPosition.js
+++ b/src/main/resources/static/js/modules/ui/signrequests/SignPosition.js
@@ -1,5 +1,6 @@
import {SignRequestParams} from "../../../prototypes/SignRequestParams.js?version=@version@";
import {EventFactory} from "../../utils/EventFactory.js?version=@version@";
+import {UserUi} from '../users/UserUi.js?version=@version@';
export class SignPosition extends EventFactory {
@@ -44,6 +45,11 @@ export class SignPosition extends EventFactory {
$(window).on('scroll', function(e) {
self.scrollTop = $(this).scrollTop();
});
+ $(document).ready(function() {
+ if(self.signImages.length === 1) {
+ self.popUserUi();
+ }
+ });
}
removeSign(id) {
@@ -84,7 +90,18 @@ export class SignPosition extends EventFactory {
}
}
+ popUserUi() {
+ if (this.userUI == null) {
+ this.userUI = new UserUi();
+ }
+ $("#add-sign-image").modal("show");
+ }
+
addSign(page, restore, signImageNumber, forceSignNumber) {
+ if(this.signImages.length === 1) {
+ this.popUserUi();
+ return;
+ }
this.disableForwardButton();
$(window).bind("beforeunload",function(event) {
return "You have some unsaved changes";
diff --git a/src/main/resources/static/js/modules/ui/signrequests/WorkspacePdf.js b/src/main/resources/static/js/modules/ui/signrequests/WorkspacePdf.js
index 3b93b6019..67d88d018 100644
--- a/src/main/resources/static/js/modules/ui/signrequests/WorkspacePdf.js
+++ b/src/main/resources/static/js/modules/ui/signrequests/WorkspacePdf.js
@@ -1,7 +1,6 @@
import {PdfViewer} from "../../utils/PdfViewer.js?version=@version@";
import {SignPosition} from "./SignPosition.js?version=@version@";
import {WheelDetector} from "../../utils/WheelDetector.js?version=@version@";
-import {UserUi} from '../users/UserUi.js?version=@version@';
export class WorkspacePdf {
@@ -16,6 +15,7 @@ export class WorkspacePdf {
this.action = action;
this.dataId = dataId;
this.formId = formId;
+ this.workflow = workflow;
this.signImageNumber = signImageNumber;
this.restore = restore;
this.postits = postits;
@@ -147,13 +147,11 @@ export class WorkspacePdf {
$("#addMinus").on("click", e => this.signPosition.addMinusImage(this.pdfViewer.pageNum));
$("#addText").on("click ", e => this.signPosition.addText(this.pdfViewer.pageNum));
- let signImageBtn = $("#signImage");
+ let signImageBtn = $("#signImageBtn");
signImageBtn.unbind();
+ let self = this;
signImageBtn.on('click', function () {
- if (this.userUI == null) {
- this.userUI = new UserUi();
- }
- $("#add-sign-image").modal("show");
+ self.signPosition.popUserUi();
});
this.notviewedAnim();
}
@@ -290,6 +288,7 @@ export class WorkspacePdf {
this.refreshAfterPageChange();
this.initForm();
this.pdfViewer.pdfDiv.on('mousedown', e => this.clickAction(e));
+
}
initForm() {
@@ -387,7 +386,7 @@ export class WorkspacePdf {
let testSign = Array.from(this.signPosition.signRequestParamses.values());
if(testSign.filter(s => s.signImageNumber >= 0 && s.isSign).length > 0) {
for (let i = 0; i < this.currentSignRequestParamses.length; i++) {
- if ((this.currentSignRequestParamses[i].ready == null || !this.currentSignRequestParamses[i].ready) && (this.formId != null || this.dataId != null)) {
+ if ((this.currentSignRequestParamses[i].ready == null || !this.currentSignRequestParamses[i].ready) && (this.formId != null || this.dataId != null || this.workflow === true)) {
return i;
}
}
diff --git a/src/main/resources/static/js/modules/ui/users/UserUi.js b/src/main/resources/static/js/modules/ui/users/UserUi.js
index 1fd47a232..262a743da 100644
--- a/src/main/resources/static/js/modules/ui/users/UserUi.js
+++ b/src/main/resources/static/js/modules/ui/users/UserUi.js
@@ -35,7 +35,9 @@ export class UserUi {
e.preventDefault();
let target = e.currentTarget;
bootbox.confirm("Voulez-vous vraiment supprimer cette signature ?", function(result){
- if(result) $('#deleteForm-' + $(target).attr("data-es-id")).submit();
+ if(result) {
+ $('#deleteForm-' + $(target).attr("data-es-id")).submit();
+ }
});
});
});
@@ -71,6 +73,10 @@ export class UserUi {
if(!this.saveSignRequestParams) {
$("#sign-request-params").val(JSON.stringify(this.signRequestParams));
}
+ if($("#name").val() === "" || $("#firstname").val() === "") {
+ $("#submitUserParamsForm").click();
+ return;
+ }
$("#userParamsForm").submit();
}
diff --git a/src/main/resources/static/js/modules/utils/PdfViewer.js b/src/main/resources/static/js/modules/utils/PdfViewer.js
index 883d7cfa9..c08869773 100644
--- a/src/main/resources/static/js/modules/utils/PdfViewer.js
+++ b/src/main/resources/static/js/modules/utils/PdfViewer.js
@@ -44,15 +44,15 @@ export class PdfViewer extends EventFactory {
let self = this;
$(document).ready(function() {
if (!globalThis.pdfjsLib || !Promise.withResolvers) {
- bootbox.alert("Votre navigateur ne support pas pdfJs pour l'affichage des PDF.
Version minimales : Firefox 121, Chrome 119, Safari 17.4", function () {
+ bootbox.alert("Votre navigateur ne support pas pdfJs pour l’affichage des PDF.
Version minimales : Firefox 121, Chrome 119, Safari 17.4", function () {
document.location = "https://www.mozilla.org/fr/firefox/new/"
});
} else {
- pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
- '/webjars/pdfjs-dist/4.2.67/legacy/build/pdf.worker.min.mjs',
+ globalThis.pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
+ '/webjars/pdfjs-dist/4.6.82/legacy/build/pdf.worker.min.mjs',
import.meta.url
- ).toString()
- pdfjsLib.getDocument(self.url).promise.then(pdf => self.startRender(pdf));
+ ).toString();
+ globalThis.pdfjsLib.getDocument(self.url).promise.then(pdf => self.startRender(pdf));
}
});
diff --git a/src/main/resources/templates/admin/currentsessions.html b/src/main/resources/templates/admin/currentsessions.html
index 87b215d55..0c6be3930 100644
--- a/src/main/resources/templates/admin/currentsessions.html
+++ b/src/main/resources/templates/admin/currentsessions.html
@@ -17,7 +17,7 @@
Utilisateurs connectés
-
+
diff --git a/src/main/resources/templates/admin/workflows/update.html b/src/main/resources/templates/admin/workflows/update.html
index 6e2e1db13..24e4e5275 100644
--- a/src/main/resources/templates/admin/workflows/update.html
+++ b/src/main/resources/templates/admin/workflows/update.html
@@ -45,17 +45,13 @@
WORKFLOW ID : Titre
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -184,14 +212,14 @@ WORKFLOW ID :
-
+
+ class="form-control" type="text"
+ th:value="${workflow.documentsSourceUri}"
+ autocomplete="on">