diff --git a/BeWoPlanerMobil/Scripts/mobileUtils.js b/BeWoPlanerMobil/Scripts/mobileUtils.js index eef179a6f..ead4d658b 100644 --- a/BeWoPlanerMobil/Scripts/mobileUtils.js +++ b/BeWoPlanerMobil/Scripts/mobileUtils.js @@ -13,6 +13,9 @@ function hideSpinner() { function showMessagePopup(title, message) { $("#popupTitle").text(title); + if(message !== null) { + $("#modal-body").html("

"); + } $("#popupMessage").text(message); $("#messagePopup").modal( @@ -25,6 +28,11 @@ function showMessagePopup(title, message) { function showMessagePopupWithCallback(title, message, callback, executeCallbackByBothButtons) { $("#popupTitle").text(title); + + if (message !== null) { + $("#modal-body").html("

"); + } + $("#popupMessage").text(message); $("#message-popup-ok-btn").on("click", function() { @@ -32,8 +40,7 @@ function showMessagePopupWithCallback(title, message, callback, executeCallbackB }); if (executeCallbackByBothButtons === true) { - $("#message-popup-close-btn").on("click", - function() { + $("#message-popup-close-btn").on("click", function() { callback(); }); } @@ -85,6 +92,9 @@ function isInArray(value, array) { function showMessagePopupWithHtml(title, html) { $("#popupTitle").text(title); + if(message !== null) { + $("#modal-body").html("

"); + } $("#popupMessage").html(html); $("#messagePopup").modal( @@ -112,10 +122,17 @@ function hasEmptyRequiredFields(form) { } function showAboutPopup() { + // Auf deutsch? var text = "SignaturePad:
Copyright (c) 2018 Szymon Nowak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."; + $("#message-popup-ok-btn").unbind(); + $("#message-popup-close-btn").unbind(); + $("#popupTitle").text("Copyrights"); - $("#popupMessage").html(text); + + $("#modal-body").html("

"); + + $("#modal-body").html(text); $("#messagePopup").modal( { diff --git a/BeWoPlanerMobil/Scripts/signature.js b/BeWoPlanerMobil/Scripts/signature.js index 1a39a25d7..157bc6e71 100644 --- a/BeWoPlanerMobil/Scripts/signature.js +++ b/BeWoPlanerMobil/Scripts/signature.js @@ -31,7 +31,20 @@ function resizeCanvas(sketchPadId, canvasRoId) { } if(isMinDifferenceMet) { + console.log("changing canvas size"); + var sourceCanvas = document.getElementById(sketchPadId.split("#")[1]); + var canvasContext = sourceCanvas.getContext("2d"); + var imageData = sourceCanvas.toDataURL("image/png"); + $(sketchPadId).prop("width", newWidth); + + var img = new Image; + + img.onload = function() { + canvasContext.drawImage(img, 0, 0); + }; + + img.src = imageData; } } } diff --git a/BeWoPlanerMobil/Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/view-scripts/main.js index 110a1c2b9..dec9a148e 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/main.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/main.js @@ -363,7 +363,7 @@ function validateForm(form) { if(isValid === false) { hideSpinner(); $("#messagePopup .modal-body").html('"); - + showMessagePopupWithCallback("Fehler", null, function() { $("#messagePopup .modal-body").html(); }, true); @@ -385,7 +385,7 @@ function validateForm(form) { var kannTrotzdemGespeichertWerden = message.KannTrotzdemGespeichertWerden; var background = kannTrotzdemGespeichertWerden ? "alert-warning" : "alert-danger"; - + $("#messagePopup .modal-body").html('"); showMessagePopupWithCallback("Fehler", null, function() { diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 190374409..887faf18d 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -1512,18 +1512,18 @@ - -
-
- -
-
+
+
+ +
+
+ diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index a469c5b9b..d9f082e3b 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -202,7 +202,7 @@ -