Funktionierende SelectionButtons und Init-Zustand der Seite (Kein POSTBACK!) alle ist ausgewählt

This commit is contained in:
ja
2021-09-21 11:00:01 +02:00
parent 51fc862997
commit 89376e66e2
4 changed files with 42 additions and 38 deletions

View File

@@ -23,8 +23,7 @@
</script> </script>
<!-- Scroll Script--> <!-- Scroll Script-->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<%@ import Namespace="MySql.Data.MySqlClient" %> <%@ import Namespace="MySql.Data.MySqlClient" %>

View File

@@ -78,24 +78,24 @@
<div class="d-none d-md-block"> <div class="d-none d-md-block">
<div style=" width:780px; margin-left:8px"> <div style=" width:780px; margin-left:8px">
<asp:RadioButtonList id="RadioButtonList1" runat="server" RepeatDirection="Horizontal" style="border-color:#fff"> <asp:RadioButtonList id="RadioButtonList1" runat="server" RepeatDirection="Horizontal" style="border-color:#fff">
<asp:ListItem ID="rbt_Alle" GroupName="radios" style="font-size:/*17px*/1.063em;margin-left:0px"><label id="lbl_rbt_Alle" for="rbt_Alle">Alle</label></asp:ListItem> <asp:ListItem ID="rbt_Alle" name="radios" style="font-size:/*17px*/1.063em;margin-left:0px"><label id="lbl_rbt_Alle" for="rbt_Alle" style="margin-left:3px;">Alle</label></asp:ListItem>
<asp:ListItem ID="rbt_Erf" GroupName="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><span for="rbt_Erf" style="margin-left:3px;">Erfasst</span></asp:ListItem> <asp:ListItem ID="rbt_Erf" name="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><label id="lbl_rbt_Erf" for="rbt_Erf" style="margin-left:3px;">Erfasst</label></asp:ListItem>
<asp:ListItem ID="rbt_Vorb" GroupName="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><span style="margin-left:3px;">Vorbereitet</span></asp:ListItem> <asp:ListItem ID="rbt_Vorb" name="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><label id="lbl_rbt_Vorb" for="rbt_Vorb" style="margin-left:3px;">Vorbereitet</label></asp:ListItem>
<asp:ListItem ID="rbt_Vorg" GroupName="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><span style="margin-left:3px;">Vorgeschrieben</span></asp:ListItem> <asp:ListItem ID="rbt_Vorg" name="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><label id="lbl_rbt_Vorg" for="rbt_Vorg" style="margin-left:3px;">Vorgeschrieben</label></asp:ListItem>
<asp:ListItem ID="rbt_Ankunft" GroupName="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><span style="margin-left:3px;">Ankunft</asp:ListItem> <asp:ListItem ID="rbt_Ankunft" name="radios" style="font-size:/*17px*/1.063em;margin-left:4px"><label id="lbl_rbt_Ankunft" for="rbt_Ankunft" style="margin-left:3px;">Ankunft</label></asp:ListItem>
<asp:ListItem ID="rbt_Freig" GroupName="radios" data-bs-toggle="tooltip" data-bs-placement="top" title="Wenn dieser Filter angewählt ist, bitte das Datum eingrenzen." style="font-size:/*17px*/1.063em;margin-left:4px"><label>Freigabe</label></asp:ListItem> <asp:ListItem ID="rbt_Freig" name="radios" data-bs-toggle="tooltip" data-bs-placement="top" title="Wenn dieser Filter angewählt ist, bitte das Datum eingrenzen." style="font-size:/*17px*/1.063em;margin-left:4px"><label id="lbl_rbt_Freig" for="rbt_Freig" style="margin-left:3px;">Freigabe</label></asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
</div> </div>
<div class="d-md-none"> <div class="d-md-none">
<div class="col-8" style="margin-left:8px" > <div class="col-8" style="margin-left:8px" >
<asp:RadioButtonList id="RadioButtonList2" runat="server" RepeatDirection="Vertical" style="border-color:#fff"> <asp:RadioButtonList id="RadioButtonList2" runat="server" RepeatDirection="Vertical" style="border-color:#fff">
<asp:ListItem ID="rbt_Alle_M" GroupName="radios2" style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Alle</span></asp:ListItem> <asp:ListItem ID="rbt_Alle_M" name="radios" style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Alle_M" for="rbt_Alle_M" style="margin-left:3px;">Alle</label></asp:ListItem>
<asp:ListItem ID="rbt_Erf_M" GroupName="radios2" style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Erfasst</asp:ListItem> <asp:ListItem ID="rbt_Erf_M" name="radios" style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Erf_M" for="rbt_Erf_M" style="margin-left:3px;">Erfasst</label></asp:ListItem>
<asp:ListItem ID="rbt_Vorb_M" GroupName="radios2" style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Vorbereitet</asp:ListItem> <asp:ListItem ID="rbt_Vorb_M" name="radios" style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Vorb_M" for="rbt_Vorb_M" style="margin-left:3px;">Vorbereitet</label></asp:ListItem>
<asp:ListItem ID="rbt_Vorg_M" GroupName="radios2" style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Vorgeschrieben</asp:ListItem> <asp:ListItem ID="rbt_Vorg_M" name="radios" style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Vorg_M" for="rbt_Vorg_M" style="margin-left:3px;">Vorgeschrieben</label></asp:ListItem>
<asp:ListItem ID="rbt_Ankunft_M" GroupName="radios2" style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Ankunft</asp:ListItem> <asp:ListItem ID="rbt_Ankunft_M" name="radios" style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Ankunft_M" for="rbt_Ankunft_M" style="margin-left:3px;">Ankunft</label></asp:ListItem>
<asp:ListItem ID="rbt_Freig_M" GroupName="radios2" data-bs-toggle="tooltip" data-bs-placement="top" title="Wenn dieser Filter angewählt ist, bitte das Datum eingrenzen." style="font-size:/*17px*/1.063em"><span style="margin-left:3px;">Freigabe</asp:ListItem> <asp:ListItem ID="rbt_Freig_M" name="radios" data-bs-toggle="tooltip" data-bs-placement="top" title="Wenn dieser Filter angewählt ist, bitte das Datum eingrenzen." style="font-size:/*17px*/1.063em"><label id="lbl_rbt_Freig_M" for="rbt_Freig_M" style="margin-left:3px;">Freigabe</label></asp:ListItem>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
</div> </div>
@@ -227,31 +227,33 @@
}); });
</script> </script>
<script type='text/javascript'> <script type='text/javascript'>
$(document).ready(function () { $(document).ready(function() {
/*$("#container2").hide();*/
$("#container2").hide();
$('#<%=RadioButtonList1.ClientID %> input[type="radio"]').change(function () { $('#<%=RadioButtonList1.ClientID %> input[type="radio"]').change(function () {
var idVal = $(this).attr("id"); var idVal = $(this).attr("id");
alert($("label[for='" + idVal + "']").text()); /*alert($("label[for='" + idVal + "']").text());*/
if ($("label[for='" + idVal + "']").text() == "Alle"){ if ($("label[for='" + idVal + "']").text() == "Alle") {
$("#container2").show(); $("#container2").show();
} else if ($("label[for='" + idVal + "']").text() == "Freigabe") { } else if ($("label[for='" + idVal + "']").text() == "Freigabe") {
$("#container2").show(); $("#container2").show();
} else { } else {
$("#container2").hide(); $("#container2").hide();
} }
}); });
$('#<%=RadioButtonList2.ClientID %> input[type="radio"]').change(function () {
var idVal = $(this).attr("id");
alert($("label[for='" + idVal + "']").text());
if ($("label[for='" + idVal + "']").text() == "Alle") { $('#<%=RadioButtonList2.ClientID %> input[type="radio"]').change(function () {
$("#container2").show(); var idVal = $(this).attr("id");
} else if ($("label[for='" + idVal + "']").text() == "Freigabe") { /*alert($("label[for='" + idVal + "']").text());*/
$("#container2").show(); if ($("label[for='" + idVal + "']").text() == "Alle") {
} else { $("#container2").show();
$("#container2").hide(); } else if ($("label[for='" + idVal + "']").text() == "Freigabe") {
} $("#container2").show();
}); } else {
$("#container2").hide();
}
});
});
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -27,9 +27,12 @@ Partial Class Kundenbereich_Default
datevon = ersterdat datevon = ersterdat
datebis = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString datebis = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString
pickdate2.Text = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString pickdate2.Text = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString
Else Else
datevon = Nothing datevon = Nothing
datebis = Nothing datebis = Nothing
rbt_Alle.Selected = True
rbt_Alle_M.Selected = True
normaltable.EnableViewState = True normaltable.EnableViewState = True
End If End If
End Sub End Sub

View File

@@ -7,7 +7,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "VERAG_Homepage", "http://lo
ProjectSection(WebsiteProperties) = preProject ProjectSection(WebsiteProperties) = preProject
UseIISExpress = "true" UseIISExpress = "true"
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7" TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7"
ProjectReferences = "" ProjectReferences = "{a3b497bd-842c-4a2b-b398-ed1976849df1}|VERAG_PROG_ALLGEMEIN.dll;"
Debug.AspNetCompiler.VirtualPath = "/localhost_56551" Debug.AspNetCompiler.VirtualPath = "/localhost_56551"
Debug.AspNetCompiler.PhysicalPath = "..\VERAG_Homepage\" Debug.AspNetCompiler.PhysicalPath = "..\VERAG_Homepage\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56551\" Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56551\"