From bccd38ec2c961f89deb276790bc6933f2a42405f Mon Sep 17 00:00:00 2001 From: Lyndon Date: Wed, 27 Jun 2018 13:55:20 +0200 Subject: [PATCH] Textbausteine werden oberhalb des Textbausteinebuttons als Popup angezeigt. --- BeWoPlanerMobil/Content/BeWoMobileStyle.css | 109 +++++++++++++------- BeWoPlanerMobil/Models/MainModel.cs | 2 +- BeWoPlanerMobil/Scripts/gruppenbuchung.js | 2 - BeWoPlanerMobil/Scripts/initialization.js | 4 - BeWoPlanerMobil/Scripts/mainView.js | 25 ++++- BeWoPlanerMobil/Views/Main/Main.cshtml | 22 ++-- BeWoPlanerMobil/Views/Shared/_Layout.cshtml | 4 +- 7 files changed, 111 insertions(+), 57 deletions(-) diff --git a/BeWoPlanerMobil/Content/BeWoMobileStyle.css b/BeWoPlanerMobil/Content/BeWoMobileStyle.css index 2676bd389..b9c7b8b78 100644 --- a/BeWoPlanerMobil/Content/BeWoMobileStyle.css +++ b/BeWoPlanerMobil/Content/BeWoMobileStyle.css @@ -229,7 +229,7 @@ span { background-repeat: no-repeat; background-position: center; background-size: contain; - padding:7.5px 15px; + padding:7.5px 15px; } .floating-element-container { @@ -253,7 +253,7 @@ input[disabled], button[disabled]:active, input[type=submit][disabled]:active, t .header-div { line-height: normal; vertical-align: middle; - + overflow: hidden; background-color: #2a2929; } @@ -264,7 +264,7 @@ input[disabled], button[disabled]:active, input[type=submit][disabled]:active, t } .anlegen-btn { - float:right; + float:right; width: auto; } @@ -313,11 +313,11 @@ ul { } #menu-div { - overflow: hidden; - background-color: #2a2929; - margin-top: -1.8em; - margin-bottom: 1.3em; - float: right; + overflow: hidden; + background-color: #2a2929; + margin-top: -1.8em; + margin-bottom: 1.3em; + float: right; width: auto; } /*#endregion*/ @@ -335,7 +335,7 @@ ul { } #recordLoader_select { - width: 100%; + width: 100%; font-size:13px; } @@ -369,12 +369,12 @@ ul { #popupDiv, #errorPopupDiv,#SuccessPopupDiv,#AendernPopupDiv { width:90%; - height: 20%; + height: 20%; background-color: #ffffff; border: 1px solid #FF5A00; - display: none; + display: none; margin: auto; - position: absolute; + position: absolute; z-index: 900; top: 0; left: 0; @@ -383,19 +383,19 @@ ul { } .popupBtn{ - width: auto; - border: none; + width: auto; + border: none; } .SuccessPopupOkBtn,.AendernPopupOkBtn { - width: auto; - border: none; + width: auto; + border: none; } .SuccessPopupUSchrift,.AendernPopupUSchrift { - width: auto; - border: none; + width: auto; + border: none; } /*#endregion*/ @@ -464,7 +464,7 @@ textarea { -o-animation: spin 2s ease infinite; animation: spin 2s ease infinite; } - + @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg);}} @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg);}} @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg);}} @@ -509,7 +509,7 @@ textarea { .styled-select-div { overflow: hidden; background: url('images/toggle-icon-d.svg') no-repeat right; - background-position: 99.5% center; + background-position: 99.5% center; border: 1px solid #bbb; display: block; } @@ -523,7 +523,7 @@ textarea { } #sc-dropdown-container { - margin-bottom: .2em; + margin-bottom: .2em; } .styled-select-div select, .disabled-select-container select { @@ -536,7 +536,7 @@ textarea { -moz-appearance: none; padding-left: 1em; padding-right: 1.5em; - width: 100%; + width: 100%; } .styled-select-div select option:nth-child(odd) { @@ -548,14 +548,14 @@ textarea { } #recordLoader_select_container { - width: 25%; - float: left; + width: 25%; + float: left; margin-top: .5em; } #logout-form { - display: inline; - margin: 0; + display: inline; + margin: 0; padding: 0; } @@ -568,7 +568,7 @@ textarea { } #popupBtnDiv, #errorPopupBtnDiv,#SuccessPopupBtnDiv,#AendernPopupDiv{ - margin: 0 auto; + margin: 0 auto; display: block; } @@ -679,11 +679,11 @@ article.infobox section h2 { left: 0; top: -30px; - width: 25%; + width: 20%; height: 29px; font-size: 12px; font-weight: normal; - + margin: 0; background-color: rgba(0, 0, 0, 0.1); border-radius: 0 0 0 0; @@ -695,22 +695,22 @@ article.infobox section h2 { } article.infobox section:nth-child(2) h2{ - left: 25%; + left: 20%; z-index: 1; } article.infobox section:nth-child(3) h2{ - left: 50%; + left: 40%; z-index:2; } article.infobox section:nth-child(4) h2{ - left: 75%; + left: 60%; z-index: 3; } article.infobox section:nth-child(5) h2{ - left: 90%; + left: 80%; z-index: 4; } @@ -726,7 +726,7 @@ article.infobox section:target, article.infobox section:target h2 { color: #000000; z-index: 1; background-color: #FFFFFF; - border-color:#FF5A00; + border-color:#FF5A00; } article.infobox section:target h2 a { @@ -754,4 +754,43 @@ article.infobox section:target h2 a { .date-input-css {} -.select-container {} \ No newline at end of file +.select-container {} + +.text-module-popup-div-background { + display: none; + position: absolute; + width: 100%; + height: 100%; + z-index: 899; + top: 0; + left: 0; + bottom: 0; + right: 0; + background-color: #bbbbbb; + opacity: .5; + overflow: hidden; +} + +.text-module-popup-div { + display: none; + position: absolute; + background-color: #ffffff; + border: 1px solid #FF5A00; + margin: auto; + width: 95%; + height: 50%; + z-index: 900; + padding: 2px; + top: 0; + left: 0; + bottom: 0; + right: 0; + overflow-y: scroll; +} + +.kollabierbar-text-modules { + font-size: 13px; + color: #555555; + margin-top: -5px; + padding: .5em; +} diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs index 046c78598..628b19d7d 100644 --- a/BeWoPlanerMobil/Models/MainModel.cs +++ b/BeWoPlanerMobil/Models/MainModel.cs @@ -102,7 +102,7 @@ namespace BeWoPlanerMobil.Models public static bool IsEmployeeSelectionVisible => MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees) || MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreationForOtherTeamMember); - public static bool IsTextbausteineVisible => false; //MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineAlleAnsehen) || MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen); + public static bool IsTextbausteineVisible => MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineAlleAnsehen) || MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen); public bool ShowDistanceField { get; set; } diff --git a/BeWoPlanerMobil/Scripts/gruppenbuchung.js b/BeWoPlanerMobil/Scripts/gruppenbuchung.js index cd340e65d..fa51abe04 100644 --- a/BeWoPlanerMobil/Scripts/gruppenbuchung.js +++ b/BeWoPlanerMobil/Scripts/gruppenbuchung.js @@ -27,7 +27,6 @@ function removeSupportConceptFromList(pSelectedSupportConceptOid, event) { function addEmployeeToGruppenbuchung(event) { const selectedEmployeeOid = $("#groupBookingEmployeesDropDown").find(":selected").val(); -// if($(`#employee_tr_${selectedEmployeeOid}`).length === 0) { if($('#employee_tr_' + selectedEmployeeOid).length === 0) { showSanduhr(); @@ -71,7 +70,6 @@ function addSupportConceptGroupToGroupBooking(event) { for(let i = 0; i < supportConceptOids.length; i++) { const isSelected = $('#supportconcept_tr_' + supportConceptOids[i]).length !== 0; - //console.log(`support concept oid: ${supportConceptOids[i]}; is already selected: ${isSelected}`); console.log('support concept oid: ' + supportConceptOids[i] + '; is already selected: ' + isSelected); if(supportConceptOids[i] !== "0" && $('#supportconcept_tr_' + supportConceptOids[i]).length === 0) { diff --git a/BeWoPlanerMobil/Scripts/initialization.js b/BeWoPlanerMobil/Scripts/initialization.js index 11abd1604..2953fc555 100644 --- a/BeWoPlanerMobil/Scripts/initialization.js +++ b/BeWoPlanerMobil/Scripts/initialization.js @@ -143,7 +143,6 @@ function initBeWoMobile(actionPath) { $("#anlegenEditierenBtn").prop("disabled", (supportConceptTableHasEntries === 0 || employeesTableHasEntries === 0)); } } catch(err) { - //console.log(`Fehler: ${err.message}`); console.log('Fehler: ' + err.message); } } @@ -251,9 +250,6 @@ function initializeDocumentationTextareas() { for(let i = 0; i < numberOfDocumentationTypes; i++) { const idNumber = i + 1; - //$(`#DokName${idNumber}`).text(documentationTypes[i].TypeDescription); - //$(`#Dokumentation${idNumber}`).css("display", "block"); - $('#DokName' + idNumber).text(documentationTypes[i].TypeDescription); $('#Dokumentation' + idNumber).css("display", "block"); } diff --git a/BeWoPlanerMobil/Scripts/mainView.js b/BeWoPlanerMobil/Scripts/mainView.js index 6d3711d98..85fcf829a 100644 --- a/BeWoPlanerMobil/Scripts/mainView.js +++ b/BeWoPlanerMobil/Scripts/mainView.js @@ -231,9 +231,9 @@ function setTextModule(moduleOid) { } } - console.log('Id der fokussierten DokuTextarea: ' + window.focusedDokuTextarea.attr("id")); - window.focusedDokuTextarea.val(window.focusedDokuTextarea.val() + allTextModules[moduleOid].Text); + + hideTextModulePopup(); } function setTextbaustein() { @@ -1213,7 +1213,6 @@ function loescheUnterschrift(canvas, ctx) { } - function preloadData(serviceRecordOid) { initSignatureInfo(serviceRecordOid); } @@ -1795,3 +1794,23 @@ function focusOnTab(tabIdentifier) { window.focusedDokuTextarea = $('#notiz_textbox' + tabIdentifier); }, 100); } + +function showTextModulesPopup() { + $("#kollabierbar2").css("display", "block"); + + $("#textModulePopupDivContainer").css("display", "block"); + $("#textModulePopupDivContainer").css("height", $("body").css("height")); + $("#textModulePopupDiv").css("display", "block"); + + const destination = $("#textModulesTr").offset(); + const outerHeight = $("#textModulePopupDiv").outerHeight(); + + $("#textModulePopupDiv").css({ top: destination.top - outerHeight }); +} + +function hideTextModulePopup() { + $("#textModulePopupDivContainer").css("display", "none"); + $("#textModulePopupDiv").css("display", "none"); + + $("#kollabierbar2").css("display", "none"); +} diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 383b53805..978b4454a 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -13,7 +13,7 @@
- + -
- - -
+ @@ -689,6 +685,12 @@ +
+
+ +
+
@Html.LabelFor(m => m.SelectedCustomerOid) @@ -823,7 +825,7 @@
--> -
+

Umfeld


diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index 0192be905..42891bd35 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -9,12 +9,12 @@ - + - +