From fe0011b1766d7042247fa6501555d5edb19dae5e Mon Sep 17 00:00:00 2001 From: Daniel Quathamer <danielq@memtext.de> Date: Tue, 3 Dec 2024 08:26:56 +0100 Subject: [PATCH] =?UTF-8?q?Bugfix=20Anzeige=20Schl=C3=BCsselfeld=20#7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superx/style/sx_common.css | 12 ++++++++++++ superx/xml/js/memtext/nd_functions.js | 17 +++++++++++++++++ superx/xml/nd_templates.xsl | 25 ++++++++++++++----------- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/superx/style/sx_common.css b/superx/style/sx_common.css index c75b917..993109c 100644 --- a/superx/style/sx_common.css +++ b/superx/style/sx_common.css @@ -663,6 +663,18 @@ input.schluesselfeld { color:blue } +input.ndSchluesselfeld { + border-color: hsl(var(--bulma-input-focus-h),var(--bulma-input-focus-s),var(--bulma-input-focus-l)); + --bulma-input-border-width: 1px; + --bulma-input-border-l: var(--bulma-border-l); + box-shadow: inset 0 0.0625em 0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.05); + + background-color:#FFFAF0; + font-size: var(--bulma-size-small); + padding-left: 5px; + line-height: 2; +} + .input::-moz-placeholder, .textarea::-moz-placeholder, .select select::-moz-placeholder { color: darkgrey /*rgba(54, 54, 54, 0.3)*/; } diff --git a/superx/xml/js/memtext/nd_functions.js b/superx/xml/js/memtext/nd_functions.js index 4c81630..917498f 100644 --- a/superx/xml/js/memtext/nd_functions.js +++ b/superx/xml/js/memtext/nd_functions.js @@ -274,3 +274,20 @@ function pager(frm,stylesheet,offset) frm.submit(); } + +function ndMaskeTogglekeyfields() { + document.forms['maske'].elements.keyfieldsused.value = "true"; + + for (i = 0; i < document.forms['maske'].elements.length; i++) { + e = document.forms['maske'].elements[i]; + if (e.getAttribute('class') == "ndSchluesselfeld" || e.className == + "ndSchluesselfeld") + { + var parentDiv=e.parentNode; + if (parentDiv.style.display != "none") { + parentDiv.style.display = "none"; + } else parentDiv.style.display = "inline-block"; + } + } + +} diff --git a/superx/xml/nd_templates.xsl b/superx/xml/nd_templates.xsl index 08f3cc3..44385dd 100644 --- a/superx/xml/nd_templates.xsl +++ b/superx/xml/nd_templates.xsl @@ -1148,7 +1148,7 @@ menue.push(entry); <div class="buttonbar"> <a href="/{/maske/@helpcontext}" target="_blank"><img src="../images/bookblck_rotiert.svg" alt="Benutzerhandbuch" title="Benutzerhandbuch" border="0" /></a> <a onclick="maskepreparelesezeichendlg();document.getElementById('lesezeichendlg').style='display:block'; return false;" id="btnBookmark"><img src="../images/attach.svg" alt="Lesezeichen erstellen" title="Die aktuelle SuperX-Maske als Lesezeichen im Browser speichern." border="0" /></a> - <a onclick="maskeTogglekeyfields(); return false;" id="btnDeepLink" class="linkLookImage"><img title="Schlüsselfelder an- oder ausschalten" alt="Schlüsselfelder an- oder ausschalten" src="../images/key.svg" border="0"/></a> + <a onclick="ndMaskeTogglekeyfields(); return false;" id="btnDeepLink" class="linkLookImage"><img title="Schlüsselfelder an- oder ausschalten" alt="Schlüsselfelder an- oder ausschalten" src="../images/key.svg" border="0"/></a> </div> <!--Ende buttonbar--> </div> </xsl:template> @@ -1999,7 +1999,7 @@ Seite 1 von 1 <xsl:template name="nd_selectionform_field"> <xsl:choose> - <xsl:when test="attribut!='hidden' and name!='##line##' and art!=18"> + <xsl:when test="attribut!='hidden' and name!='##line##' and art!=18 and art != 13"> <div class="field is-grouped"> <div class="label-container" lang="de"> <xsl:call-template name="nd_selectionform_field_label" /> @@ -2108,7 +2108,7 @@ Seite 1 von 1 </xsl:template> <xsl:template name="nd_SichtValue"> - <xsl:call-template name="nd_selectionform_field_input_schluesselfeld" /> + <input type="label" readonly ="true" class="input is-small is-fullwidth"> <xsl:attribute name="name"><xsl:text>label_</xsl:text> <xsl:call-template name="create_varname"><xsl:with-param name="string"><xsl:value-of select="name"/></xsl:with-param></xsl:call-template></xsl:attribute> <xsl:attribute name="id"><xsl:text>label_</xsl:text> <xsl:call-template name="create_varname"><xsl:with-param name="string"><xsl:value-of select="name"/></xsl:with-param></xsl:call-template></xsl:attribute> @@ -2322,7 +2322,7 @@ Seite 1 von 1 <!-- start art 1 oder 2 COMBO--> <xsl:when test="art='1' or art='2'"> <!--normale Combo-Box --> - <xsl:call-template name="nd_selectionform_field_input_schluesselfeld" /> + <xsl:choose> <!-- start combobox für zeilenzahl 1/nicht-dynamisches Feld--> <xsl:when test="zeilenanzahl=1 and @isDynamic='false'"> @@ -2377,6 +2377,7 @@ Seite 1 von 1 </xsl:otherwise> </xsl:choose> <!-- end Button and Skript für zeilenzahl > 1 --> + </xsl:when> <!-- end art 1 --> <!-- start 8,5 Kommentar/Label--> @@ -2571,8 +2572,8 @@ Seite 1 von 1 </xsl:choose> </div><!--Ende control is-expanded --> - - <xsl:if test="caption_long != '' and art != '13' and art != '18' and art != '8'"> + + <xsl:if test="caption_long != '' and art != '13' and art != '18' and art != '8' and art !='10' and art !='17'"> <!--<span class="info" onclick="if(document.getElementById('{concat('f_',tid)}').style.display=='none')document.getElementById('{concat('f_',tid)}').style.display='block'; else document.getElementById('{concat('f_',tid)}').style.display='none'; return false;"> <figure class="image is-24x24"> @@ -2582,8 +2583,7 @@ Seite 1 von 1 <!--<span class="button is-light tooltip is-tooltip-right" >--> <!--<span class="button is-light has-tooltip-left" >--> <!--220424BFeingefügt--> <div class="control"> <!--220424BFeingefügt--> - <button class="button is-small is-rounded has-tooltip-bottom" - onClick="return false;"> <!--220424BFgeändert--> + <button class="button is-small is-rounded has-tooltip-bottom"> <!--220424BFgeändert--> <xsl:attribute name="data-tooltip"> <xsl:call-template name="br_to_newline"> <xsl:with-param name="string"><![CDATA[]]><xsl:value-of select="caption_long"/><![CDATA[]]></xsl:with-param> @@ -2606,6 +2606,7 @@ Seite 1 von 1 <xsl:value-of select="caption_long" disable-output-escaping="yes"/> </p>--> <!--220424BFdeaktiviert--> </xsl:if> + <xsl:call-template name="nd_selectionform_field_input_schluesselfeld" /> </div> </div> </xsl:otherwise> @@ -2621,15 +2622,16 @@ Seite 1 von 1 hier wichtig, wenn z.B. sql-Feld einen Defaultwert hat... text-Workaround --> -<div class="control"> -<xsl:text disable-output-escaping="yes"><![CDATA[<input class="schluesselfeld" type="text" size="15" style="display:none" onchange="resetValidation();"]]></xsl:text> + <xsl:if test="art='1' or art='12'"> +<div class="control" style="display:none"> +<xsl:text disable-output-escaping="yes"><![CDATA[<input type="text" size="10" onchange="resetValidation();"]]></xsl:text> <xsl:text><![CDATA[ id="]]></xsl:text><xsl:call-template name="create_varname"><xsl:with-param name="string"><xsl:value-of select="name"/></xsl:with-param></xsl:call-template><xsl:text>" </xsl:text> <xsl:text><![CDATA[ name="]]></xsl:text><xsl:value-of select="name"/><xsl:text>" </xsl:text> <xsl:text><![CDATA[ tabindex="]]></xsl:text><xsl:value-of select="100+(nummer*10)+1"/><xsl:text>" </xsl:text> <xsl:text><![CDATA[ class="]]></xsl:text> <xsl:choose> <xsl:when test="typ='sql'">schluesselfeld_invisible</xsl:when> - <xsl:otherwise>schluesselfeld</xsl:otherwise> + <xsl:otherwise>ndSchluesselfeld</xsl:otherwise> </xsl:choose> <xsl:text>" </xsl:text> <xsl:if test="defaultwert/key!=''"> @@ -2650,6 +2652,7 @@ Seite 1 von 1 <xsl:text disable-output-escaping="yes"><![CDATA[ </input>]]></xsl:text> </div> + </xsl:if> </xsl:template> <xsl:template name="nd_selectionform_field_input_valuelabel"> <input type="label" readonly ="true" class="input is-small is-fullwidth">