From 967634ec678a1691adff5b375f051f4c785c7ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20K=C3=A4stle?= <sven.kaestle@gmx.de> Date: Thu, 13 Sep 2018 15:02:22 +0200 Subject: [PATCH] fix: Replace corrupt annotation click path --- .../src/main/webapp/annotation/js/annotationScript.js | 4 ++-- .../main/webapp/annotation/js/unstructuredAnnotation.js | 2 +- .../src/main/webapp/annotation/js/unstructuredUpload.js | 8 ++++---- gemeinsamforschen/src/main/webapp/core/project-student.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gemeinsamforschen/src/main/webapp/annotation/js/annotationScript.js b/gemeinsamforschen/src/main/webapp/annotation/js/annotationScript.js index b356093d..54470a00 100644 --- a/gemeinsamforschen/src/main/webapp/annotation/js/annotationScript.js +++ b/gemeinsamforschen/src/main/webapp/annotation/js/annotationScript.js @@ -68,14 +68,14 @@ $(document).ready(function() { * continue button */ $('#btnContinue').click(function () { - location.href="give-feedback.jsp?token=" + getUserTokenFromUrl(); + location.href="../feedback/give-feedback.jsp?token=" + getUserTokenFromUrl(); }); /** * back button */ $('#btnBack').click(function () { - location.href="project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); + location.href="../project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); }); /** diff --git a/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredAnnotation.js b/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredAnnotation.js index 21e4a47a..a8ab85a5 100644 --- a/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredAnnotation.js +++ b/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredAnnotation.js @@ -285,7 +285,7 @@ function saveButtonHandler() { $.when.apply($, promises).then(function () { // redirect user to project page after saving - location.href="project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); + location.href="../project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); }); // redirect user to project page after saving diff --git a/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredUpload.js b/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredUpload.js index 9a2aa3d4..2148e5cb 100644 --- a/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredUpload.js +++ b/gemeinsamforschen/src/main/webapp/annotation/js/unstructuredUpload.js @@ -37,15 +37,15 @@ $(document).ready(function() { $('#upload-textarea').val(""); // jump to previous page - window.history.back(); - //location.href="project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getProjectIdFromUrl(); + //window.history.back(); + location.href="../project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); } } // nothing to check else { // jump to previous page - window.history.back(); - //location.href="project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getProjectIdFromUrl(); + //window.history.back(); + location.href="../project-student.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); } }); diff --git a/gemeinsamforschen/src/main/webapp/core/project-student.js b/gemeinsamforschen/src/main/webapp/core/project-student.js index 85b50ac8..ff3a8f1e 100644 --- a/gemeinsamforschen/src/main/webapp/core/project-student.js +++ b/gemeinsamforschen/src/main/webapp/core/project-student.js @@ -11,7 +11,7 @@ $(document).ready(function(){ $('.annotationview').click(function () { let fullSubmissionId = $(this).closest("li").data("fullSubmissionId"); let category = $(this).closest("li").data("category"); - location.href="annotation-document.jsp?token=" + getUserTokenFromUrl() + + location.href="/annotation/annotation-document.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId") + "&fullSubmissionId=" + fullSubmissionId + "&category=" + category; @@ -41,7 +41,7 @@ $(document).ready(function(){ }); $('#btnUnstructuredUpload').click(function () { - location.href="unstructured-upload.jsp?token="+getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); + location.href="/annotation/upload-unstructured-annotation.jsp?token=" + getUserTokenFromUrl() + "&projectId=" + getQueryVariable("projectId"); }) $('.viewprojectstudent').click(function () { -- GitLab