Fixen des Accordion-Schließen Bug
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
Sub Page_Load() Handles Me.Load
|
||||
'Login-Validierung
|
||||
If Not Me.Page.User.Identity.IsAuthenticated Then
|
||||
Try
|
||||
FormsAuthentication.RedirectFromLoginPage(Me.Page.User.Identity.Name, True)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
FormsAuthentication.RedirectToLoginPage()
|
||||
End If
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField ID="hfAccordionIndex" runat="server" />
|
||||
<div style="height:0.936768149882904vh"></div>
|
||||
<div class="col-12" id="cont4">
|
||||
<div class="col-12" id="container2" style="margin-left:2px">
|
||||
@@ -108,10 +109,12 @@
|
||||
|
||||
<asp:Label ID="lbl_bis" runat="server" Text="Bis:"></asp:Label>
|
||||
<asp:TextBox id="pickdate2" Type="Date" CssClass="classTarget" runat="server"></asp:TextBox>
|
||||
<asp:Label ID="lbl_ErrorCal" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
<div id="Abstand"></div>
|
||||
<hr>
|
||||
<div id="accordion">
|
||||
|
||||
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingOne">
|
||||
@@ -119,7 +122,7 @@
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div id="collapseOne" class="accordion-collapse collapse hide" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
|
||||
<div id="collapseOne" class="accordion-collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
|
||||
<div class="card card-body">
|
||||
<div class="col-12" id="cont3">
|
||||
<div class="container">
|
||||
@@ -187,7 +190,7 @@
|
||||
</asp:Table>
|
||||
|
||||
</div>
|
||||
</div></div></div>
|
||||
</div></div>
|
||||
</div>
|
||||
<br /><br /><br />
|
||||
<% End If
|
||||
@@ -236,7 +239,7 @@
|
||||
$("#container2").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
@@ -247,5 +250,37 @@
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".accordion .accordion-collapse").on('shown.bs.collapse', function () {
|
||||
var active = $(this).attr('id');
|
||||
var panels = localStorage.panels === undefined ? new Array() : JSON.parse(localStorage.panels);
|
||||
if ($.inArray(active, panels) == -1) //check that the element is not in the array
|
||||
panels.push(active);
|
||||
localStorage.panels = JSON.stringify(panels);
|
||||
});
|
||||
|
||||
$(".accordion .accordion-collapse").on('hidden.bs.collapse', function () {
|
||||
var active = $(this).attr('id');
|
||||
var panels = localStorage.panels === undefined ? new Array() : JSON.parse(localStorage.panels);
|
||||
var elementIndex = $.inArray(active, panels);
|
||||
if (elementIndex !== -1) //check the array
|
||||
{
|
||||
panels.splice(elementIndex, 1); //remove item from array
|
||||
}
|
||||
localStorage.panels = JSON.stringify(panels); //save array on localStorage
|
||||
});
|
||||
|
||||
var panels = localStorage.panels === undefined ? new Array() : JSON.parse(localStorage.panels); //get all panels
|
||||
for (var i in panels) { //<-- panel is the name of the cookie
|
||||
if ($("#" + panels[i]).hasClass('accordion-collapse')) // check if this is a panel
|
||||
{
|
||||
$("#" + panels[i]).collapse("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -22,16 +22,9 @@ Partial Class Kundenbereich_Default
|
||||
normaltable.EnableViewState = True
|
||||
datevon = Date.Parse(pickdate1.Text)
|
||||
datebis = Date.Parse(pickdate2.Text)
|
||||
|
||||
Else
|
||||
normaltable.EnableViewState = True
|
||||
Dim erster = New Date(Now().Year, Now().Month, 1)
|
||||
Dim ersterdat = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
pickdate1.Text = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
' MsgBox(ersterdat)
|
||||
datevon = ersterdat
|
||||
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
|
||||
|
||||
rbt_Alle.Selected = True
|
||||
rbt_Alle_M.Selected = True
|
||||
|
||||
@@ -223,16 +216,24 @@ Partial Class Kundenbereich_Default
|
||||
If rbt_Alle.Selected = True Or rbt_Alle_M.Selected = True Then
|
||||
pickdate1.ValidateRequestMode = UI.ValidateRequestMode.Enabled
|
||||
pickdate2.ValidateRequestMode = UI.ValidateRequestMode.Enabled
|
||||
dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB(Server.HtmlEncode(Art), Server.HtmlEncode(Kdnrtext), {0, 1, 2, 3, 4, 5}, datevon, datebis, Server.HtmlEncode(Absender), Server.HtmlEncode(Empfaenger), Server.HtmlEncode(LKWNR), Server.HtmlEncode(KDNAFNR))
|
||||
dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB(Art, Kdnrtext, {0, 1, 2, 3, 4, 5}, datevon, datebis, Absender, Empfaenger, LKWNR, KDNAFNR)
|
||||
If pickdate1.Text = Nothing Or pickdate2.Text = Nothing Then
|
||||
Try
|
||||
Dim erster = New Date(Now().Year, Now().Month, 1)
|
||||
Dim ersterdat = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
' MsgBox(ersterdat)
|
||||
datevon = ersterdat
|
||||
pickdate1.Text = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.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
|
||||
pickdate1.BorderColor = Drawing.Color.Red
|
||||
pickdate1.BorderStyle = BorderStyle.Double
|
||||
pickdate1.BorderWidth = Unit.Pixel(2)
|
||||
pickdate2.BorderColor = Drawing.Color.Red
|
||||
pickdate2.BorderStyle = BorderStyle.Double
|
||||
pickdate2.BorderWidth = Unit.Pixel(2)
|
||||
lbl_ErrorCal.Visible = True
|
||||
lbl_ErrorCal.Style.Add("ForeColor", "red")
|
||||
lbl_ErrorCal.Text = "Kein Datum ausgewählt. Bitte auswählen!"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Catch ex As ValidationException When Date.ParseExact(pickdate1.Text, "dd.MM.yyyy", Nothing).Year < Date.ParseExact("2001", "yyyy", Nothing).Year And Date.ParseExact(pickdate2.Text, "dd.MM.yyyy", Nothing).Year > Date.ParseExact(Today, "dd.MM.yyyy", Nothing).Year
|
||||
MsgBox("Die Zeitzonen sind nicht gültig!", MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
@@ -240,6 +241,10 @@ Partial Class Kundenbereich_Default
|
||||
Try
|
||||
datevon = Date.Parse(pickdate1.Text)
|
||||
datebis = Date.Parse(pickdate2.Text)
|
||||
pickdate1.BorderWidth = Unit.Pixel(0)
|
||||
pickdate2.BorderWidth = Unit.Pixel(0)
|
||||
lbl_ErrorCal.Visible = False
|
||||
lbl_ErrorCal.Text = ""
|
||||
Catch ex As ValidationException When Date.ParseExact(pickdate1.Text, "dd.MM.yyyy", Nothing).Year < Date.ParseExact("2001", "yyyy", Nothing).Year And Date.ParseExact(pickdate2.Text, "dd.MM.yyyy", Nothing).Year > Date.ParseExact(Today, "dd.MM.yyyy", Nothing).Year
|
||||
MsgBox("Die Zeitzonen sind nicht gültig!", MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
@@ -378,7 +383,7 @@ Partial Class Kundenbereich_Default
|
||||
|
||||
Protected Sub btn_resetForm_Click(sender As Object, e As EventArgs)
|
||||
'Mobil
|
||||
rbt_Alle_M.Selected = True
|
||||
rbt_Alle_M.Selected = False
|
||||
rbt_Alle_M.Enabled = True
|
||||
rbt_Ankunft_M.Selected = False
|
||||
rbt_Ankunft_M.Enabled = True
|
||||
@@ -395,7 +400,7 @@ Partial Class Kundenbereich_Default
|
||||
txt_KdNrAuftrag_M.Text = ""
|
||||
txt_LKWNr_M.Text = ""
|
||||
'Desktop
|
||||
rbt_Alle.Selected = True
|
||||
rbt_Alle.Selected = False
|
||||
rbt_Alle.Enabled = True
|
||||
rbt_Ankunft.Selected = False
|
||||
rbt_Ankunft.Enabled = True
|
||||
|
||||
Reference in New Issue
Block a user