diff --git a/BeWoPlanerAndroid/BeWoPlanerAndroid.csproj.user b/BeWoPlanerAndroid/BeWoPlanerAndroid.csproj.user index 96a963155..3ebed1770 100644 --- a/BeWoPlanerAndroid/BeWoPlanerAndroid.csproj.user +++ b/BeWoPlanerAndroid/BeWoPlanerAndroid.csproj.user @@ -3,6 +3,7 @@ Test true + Debug|Any CPU diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index d8621999d..4056ddbdb 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -263,11 +263,11 @@ - False + True False 8808 / - http://localhost/BeWoPlanerMobil + http://localhost:8808/ False False diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index 46ff1ddb2..65f36bd35 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -1,13 +1,14 @@  - false + true + Debug|Any CPU diff --git a/BeWoPlanerMobil/Content/BeWoMobileStyle.css b/BeWoPlanerMobil/Content/BeWoMobileStyle.css index 52077e815..13bb6bfce 100644 --- a/BeWoPlanerMobil/Content/BeWoMobileStyle.css +++ b/BeWoPlanerMobil/Content/BeWoMobileStyle.css @@ -42,6 +42,12 @@ body { height: 100%; } +pre { + font-family: "Microsoft Sans Serif", Arial, sans-serif; + white-space: pre-line; + word-wrap: normal; +} + a, a:active, a:visited, a:hover { color: #555; } @@ -438,8 +444,8 @@ textarea { margin-top: 1em; } -#umfeldContainer { - display: none; +#umfeldContainer, #kommentarContainer { + display: none; } .contentTd { diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index a1aa0edd0..18a223cea 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -77,6 +77,10 @@ namespace BeWoPlanerMobil.Controllers var unter = GetSettingValue("ShowSignature"); Model.ShowSignature = unter == "1"; + #if DEBUG + Model.ShowSignature = true; + #endif + Model.GroupsOfPeople = EmployeeService.GetAllGroups(GetUser().Employee.EmployeeOid); Model.SelectedGoals = null; @@ -2611,6 +2615,7 @@ namespace BeWoPlanerMobil.Controllers public string Fax { get; set; } public string Telefon { get; set; } public string Handy { get; set; } + public string Kommentar { get; set; } public List Umfeldpersonen { get; set; } @@ -2631,6 +2636,8 @@ namespace BeWoPlanerMobil.Controllers RechnungsadressePostleitzahl = init.InvoiceAddressPostalCode; RechnungsadresseOrt = init.InvoiceAddressTown; + Kommentar = init.Notice; + foreach (var iContactDC in init.ContactInformations) { switch(iContactDC.ContactType) diff --git a/BeWoPlanerMobil/Scripts/initialization.js b/BeWoPlanerMobil/Scripts/initialization.js index 305dadb74..39d3d7217 100644 --- a/BeWoPlanerMobil/Scripts/initialization.js +++ b/BeWoPlanerMobil/Scripts/initialization.js @@ -1,6 +1,8 @@ var isEnddateSet; var numberOfDocumentationTypes; +var canvasWidth; + $(document).ready(function() { if(!$("#zeiterfassung").length) { return; @@ -55,9 +57,23 @@ $(document).ready(function() { vm = new KlientenVM(); ko.applyBindings(vm); + var documentWidth = $(document).width(); + canvasWidth = documentWidth * scaleFactor; + + $("#sketchpad").prop("width", canvasWidth); + loadSettingsAccordingToBWP(); }); +var scaleFactor = .8; +$(window).resize(function() { + var documentWidth = $(document).width(); + + if(canvasWidth !== (documentWidth * scaleFactor) && $("#sketchpad").css("display") === "inline") { + $("#sketchpad").prop("width", documentWidth * scaleFactor); + } +}); + function initBeWoMobile(actionPath) { try { $("#recordLoader_select, #kategorien_select, #leistungen_select, #textbausteine_select").prop("disabled", true); @@ -269,6 +285,8 @@ $(document).on("change", ".edit-form-input", saveFormValuesLocally(); }); +$(document).change(function() { console.log("test"); }); + function saveFormValuesLocally() { var recordObject = { category: $("#kategorien_select").val(), diff --git a/BeWoPlanerMobil/Scripts/mainView.js b/BeWoPlanerMobil/Scripts/mainView.js index d50cf5522..01ce3982f 100644 --- a/BeWoPlanerMobil/Scripts/mainView.js +++ b/BeWoPlanerMobil/Scripts/mainView.js @@ -976,6 +976,9 @@ function nextDayButtonClick() { loadAppointments(newtoday); } + + + var canvas, ctx; var mouseX, mouseY, mouseDown = 0; var lastpositionx = 0; @@ -985,16 +988,15 @@ var newpositiony = 0; var minuswert = -20; var maxwert = 20; var posix = 0; -var posiy = 0; +var posiy = 0; +var r, g, b = 0; +var a = 255; function loadUnterschriftFeldFunktion() { function drawDot(ctx, x, y, size) { - r = 0; g = 0; b = 0; a = 255; - ctx.fillStyle = "rgba(" + r + "," + g + "," + b + "," + (a / 255) + ")"; - if(lastpositionx != 0) { - + if(lastpositionx !== 0) { ctx.beginPath(); ctx.arc(x, y, size, 1, Math.PI * 0.25, true); newpositionx = x; @@ -1042,14 +1044,14 @@ function loadUnterschriftFeldFunktion() { function sketchpadMouseMove(e) { getMousePos(e); - if(mouseDown == 1) { + if(mouseDown === 1) { drawDot(ctx, mouseX, mouseY, 3); } } function getMousePos(e) { if(!e) { - var e = event; + e = event; } if(e.offsetX) { @@ -1076,7 +1078,7 @@ function loadUnterschriftFeldFunktion() { function getTouchPos(e) { if (!e) { - var e = event; + e = event; } if (e.touches) { @@ -1089,12 +1091,12 @@ function loadUnterschriftFeldFunktion() { } function init() { - //canvas = $("#sketchpad"); - canvas = document.getElementById('sketchpad'); + canvas = document.getElementById("sketchpad"); if (canvas.getContext) { - ctx = canvas.getContext('2d'); + ctx = canvas.getContext("2d"); } + if (ctx) { canvas.addEventListener("mousedown", sketchpadMouseDown, false); canvas.addEventListener("mousemove", sketchpadMouseMove, false); @@ -1245,6 +1247,8 @@ function loescheUnterschrift(canvas, ctx) { } + + function preloadData(serviceRecordOid) { initSignatureInfo(serviceRecordOid); } @@ -1291,6 +1295,7 @@ function klientenLaden() { if(oid === -1) { $("#klientenTabelle").css("display", "none"); $("#umfeldContainer").css("display", "none"); + $("#kommentarContainer").css("display", "none"); hideSanduhr(); @@ -1300,6 +1305,7 @@ function klientenLaden() { makeAjaxCall("GET", getSelectedCustomerUrl, function (json) { $("#klientenTabelle").css("display", "block"); $("#umfeldContainer").css("display", "block"); + $("#kommentarContainer").css("display", "block"); if(json === "SessionTimeout") { window.location.href = redirectLink; @@ -1313,11 +1319,10 @@ function klientenLaden() { }); }, - { - customerOid: oid - }, + { + customerOid: oid + }, hideSanduhr); - } function KlientenVM() { @@ -1342,6 +1347,7 @@ function KlientenVM() { this.Wohnheim = ko.observable(""); this.mobileLink = ko.observable(""); this.landLineLink = ko.observable(""); + this.kommentar = ko.observable(""); this.update = function (data) { this.vorname(data.Vorname); @@ -1366,6 +1372,7 @@ function KlientenVM() { this.handy(data.Handy); this.mobileLink('tel:' + data.Handy); this.landLineLink('tel:' + data.Telefon); + this.kommentar(data.Kommentar); var mappedUmfeldpersonen = $.map(data.Umfeldpersonen, function (item) { return new UmfPers(item); }); @@ -1427,22 +1434,22 @@ function calcPropFieldMinSizes() { $(".eigenschaftsdiv").each( function (index, element) { - var x = $(element).clone().css({ "height": "auto", "width": "auto" }).appendTo("body"); + var x = $(element).clone().css({ "height": "auto", "width": "auto" }).appendTo("body"); - var temporaryWidth = x.outerWidth(true); - var temporaryHeight = x.outerHeight(true); + var temporaryWidth = x.outerWidth(true); + var temporaryHeight = x.outerHeight(true); - x.remove(); + x.remove(); - elementCount++; + elementCount++; - if(temporaryWidth > width) { - width = temporaryWidth; - } + if(temporaryWidth > width) { + width = temporaryWidth; + } - if(temporaryHeight > height) { - height = temporaryHeight; - } + if(temporaryHeight > height) { + height = temporaryHeight; + } } ); @@ -1468,11 +1475,11 @@ function updateEigenschaftsfelder() { var width = parseInt(customerTableWidth / maxAnzahl) - 16; - if(minSizes != undefined) { + if(minSizes !== undefined) { $(".eigenschaftsdiv").each( function (index, element) { - $(element).css("width", width + "px"); - $(element).css("height", (minSizes.minHeight - 16) + "px"); + $(element).css("width", width + "px"); + $(element).css("height", (minSizes.minHeight - 16) + "px"); } ); } @@ -1498,13 +1505,13 @@ function hideSanduhr() { } if($("#SuccessPopupDiv").css("display") === "none" && $("#popupDiv").css("display") === "none") { - $(".modalWrapper").css("display", "none"); - $(".modalWrapper").css("height", "0"); + $(".modalWrapper").css("display", "none"); + $(".modalWrapper").css("height", "0"); } if($("#AendernPopupDiv").css("display") === "none" && $("#popupDiv").css("display") === "none") { - $(".modalWrapper").css("display", "none"); - $(".modalWrapper").css("height", "0"); + $(".modalWrapper").css("display", "none"); + $(".modalWrapper").css("height", "0"); } $(".warte-animation").css("display", "none"); @@ -1652,7 +1659,7 @@ function preselectCustomer() { $("#customersDropDown option").each(function () { if(this.value === valueToSelect === true) { $("#customersDropDown").val(valueToSelect); - $("#customersDropDown").trigger('change'); + $("#customersDropDown").trigger("change"); return false; } else { diff --git a/BeWoPlanerMobil/Util/MobileUtils.cs b/BeWoPlanerMobil/Util/MobileUtils.cs index 001eed563..771f41725 100644 --- a/BeWoPlanerMobil/Util/MobileUtils.cs +++ b/BeWoPlanerMobil/Util/MobileUtils.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; - +using System.Web; using BS.Shared.DataContracts; namespace BeWoPlanerMobil.Util @@ -48,5 +48,17 @@ namespace BeWoPlanerMobil.Util return decValue; } + + public static string TextToHtml(string text) + { + var result = HttpUtility.HtmlEncode(text); + + result = result.Replace("\r\n", "\r"); + result = result.Replace("\n", "\r"); + result = result.Replace("\r", "
\r\n"); + result = result.Replace(" ", "  "); + + return result; + } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 2f7ff53de..bba306a88 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -796,36 +796,42 @@ - - + + +
+

Kommentar

+
+

+    
+

Umfeld


@@ -835,46 +841,47 @@
+
@@ -973,14 +980,17 @@ + +

+ + +
+
- +
-

- - - +