Ein Alle-Radio-Button wurde eingfügt und mit Funktion versehen

This commit is contained in:
ja
2021-09-16 10:34:42 +02:00
parent c8810db583
commit 08aa7a8bb4
2 changed files with 46 additions and 61 deletions

View File

@@ -77,6 +77,7 @@
</div>
<div class="col-8" style="margin-left:8px" >
<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">Alle</asp:ListItem>
<asp:ListItem ID="rbt_Erf" GroupName="radios" style="font-size:/*17px*/1.063em"> Erfasst</asp:ListItem>
<asp:ListItem ID="rbt_Vorb" GroupName="radios" style="font-size:/*17px*/1.063em">Vorbereitet</asp:ListItem>
<asp:ListItem ID="rbt_Vorg" GroupName="radios" style="font-size:/*17px*/1.063em"> Vorgeschrieben</asp:ListItem>
@@ -185,7 +186,8 @@
</div>
</div>--%>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$('#accordion').on('shown.bs.collapse', function (e) {
$(e.target).data('bs.collapse').$trigger.attr('src', 'https://s22.postimg.org/hkrauaofx/Mathematic_Minus2.png');
@@ -195,29 +197,19 @@
$(e.target).data('bs.collapse').$trigger.attr('src', 'https://s22.postimg.org/9takvqkal/Mathematic_Plus2.png');
});
</script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type='text/javascript'>
<script type='text/javascript'>
$(document).ready(function () {
$("#container2").hide();
let htmlNodes = document.getElementsByName('status');
let radioButtonsArray = Array.from(htmlNodes);
let isAnyRadioButtonChecked = radioButtonsArray.some(element => element.checked);
if (isAnyRadioButtonChecked == false){
$("#container2").show();
} else {
$("#container2").hide();
}
$("#container2").hide();
$('#<%=RadioButtonList1.ClientID %> input[type="radio"]').change(function () {
if ($(this).val() == "Freigabe") {
$("#container2").show();
$("#container2").show();
} else if ($(this).val() == "Alle") {
$("#container2").show();
} else {
$("#container2").hide();
}
}
});
});
});
</script>
</asp:Content>