Commit 515be072 authored by Aria Givi's avatar Aria Givi

formatierung

parent 0d532cac
$(function () {
$(function() {
setLabelText();
setKeyListeners();
setDropdownListeners();
......@@ -7,50 +7,67 @@ $(function () {
/**
* Sets all action listeners for this page
*/
function setKeyListeners () {
function setKeyListeners() {
$(document).keydown(function(event) {
if ($("input#show-create-focus").is(':checked')) {
if ($("input#show-create-focus").is(":checked")) {
if (event.keyCode == 27) {
$("input#show-create-focus").prop('checked', false);
$("input#show-create-focus").prop("checked", false);
} else if (event.keyCode == 13) {
$('#customSearchForm').submit();
$("#customSearchForm").submit();
}
}
});
}
function setDropdownListeners() {
$('input:checkbox#toggle-dropdowns').change(function() {
if($(this).is(':checked')) {
$("#toggle-dropdowns-label").html(t('close-dropdowns') + ' <i class="fa fa-minus-square" aria-hidden="true"></i>');
$(".focus-dropdown-toggle").prop('checked', true);
} else {
$("#toggle-dropdowns-label").html(t('open-dropdowns') + ' <i class="fa fa-plus-square" aria-hidden="true"></i>');
$(".focus-dropdown-toggle").prop('checked', false);
}
$("input:checkbox#toggle-dropdowns").change(function() {
if ($(this).is(":checked")) {
$("#toggle-dropdowns-label").html(
t("close-dropdowns") +
' <i class="fa fa-minus-square" aria-hidden="true"></i>'
);
$(".focus-dropdown-toggle").prop("checked", true);
} else {
$("#toggle-dropdowns-label").html(
t("open-dropdowns") +
' <i class="fa fa-plus-square" aria-hidden="true"></i>'
);
$(".focus-dropdown-toggle").prop("checked", false);
}
});
$(".focus-dropdown-toggle").change(function() {
var expanded = false;
$(".focus-dropdown-toggle").each(function() {
if($(this).is(':checked')) {
if ($(this).is(":checked")) {
expanded = true;
}
});
if(expanded === true) {
$("#toggle-dropdowns-label").html(t('close-dropdowns') + ' <i class="fa fa-minus-square" aria-hidden="true"></i>');
$('input:checkbox#toggle-dropdowns').prop('checked', true);
if (expanded === true) {
$("#toggle-dropdowns-label").html(
t("close-dropdowns") +
' <i class="fa fa-minus-square" aria-hidden="true"></i>'
);
$("input:checkbox#toggle-dropdowns").prop("checked", true);
} else {
$("#toggle-dropdowns-label").html(t('open-dropdowns') + ' <i class="fa fa-plus-square" aria-hidden="true"></i>');
$('input:checkbox#toggle-dropdowns').prop('checked', false);
$("#toggle-dropdowns-label").html(
t("open-dropdowns") +
' <i class="fa fa-plus-square" aria-hidden="true"></i>'
);
$("input:checkbox#toggle-dropdowns").prop("checked", false);
}
});
}
function setLabelText() {
if($('input:checkbox#toggle-dropdowns').is(':checked')) {
$("#toggle-dropdowns-label").html(t('close-dropdowns') + ' <i class="fa fa-minus-square" aria-hidden="true"></i>');
if ($("input:checkbox#toggle-dropdowns").is(":checked")) {
$("#toggle-dropdowns-label").html(
t("close-dropdowns") +
' <i class="fa fa-minus-square" aria-hidden="true"></i>'
);
} else {
$("#toggle-dropdowns-label").html(t('open-dropdowns') + ' <i class="fa fa-plus-square" aria-hidden="true"></i>');
$("#toggle-dropdowns-label").html(
t("open-dropdowns") +
' <i class="fa fa-plus-square" aria-hidden="true"></i>'
);
}
}
......@@ -66,6 +66,7 @@
font-size: 16px;
content: " ➕ ";
margin-left: 3px;
vertical-align: middle;
}
&~.row {
-webkit-transition: max-height 0.4s ease;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment