mirror of
https://github.com/fverdugo/XM_40017.git
synced 2025-12-29 18:28:31 +01:00
build based on 4e6b769
This commit is contained in:
@@ -77,30 +77,35 @@ require(['jquery'], function($) {
|
||||
let timer = 0;
|
||||
var isExpanded = true;
|
||||
|
||||
$(document).on("click", ".docstring header", function () {
|
||||
let articleToggleTitle = "Expand docstring";
|
||||
$(document).on(
|
||||
"click",
|
||||
".docstring .docstring-article-toggle-button",
|
||||
function () {
|
||||
let articleToggleTitle = "Expand docstring";
|
||||
const parent = $(this).parent();
|
||||
|
||||
debounce(() => {
|
||||
if ($(this).siblings("section").is(":visible")) {
|
||||
$(this)
|
||||
.find(".docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-down")
|
||||
.addClass("fa-chevron-right");
|
||||
} else {
|
||||
$(this)
|
||||
.find(".docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-right")
|
||||
.addClass("fa-chevron-down");
|
||||
debounce(() => {
|
||||
if (parent.siblings("section").is(":visible")) {
|
||||
parent
|
||||
.find("a.docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-down")
|
||||
.addClass("fa-chevron-right");
|
||||
} else {
|
||||
parent
|
||||
.find("a.docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-right")
|
||||
.addClass("fa-chevron-down");
|
||||
|
||||
articleToggleTitle = "Collapse docstring";
|
||||
}
|
||||
articleToggleTitle = "Collapse docstring";
|
||||
}
|
||||
|
||||
$(this)
|
||||
.find(".docstring-article-toggle-button")
|
||||
.prop("title", articleToggleTitle);
|
||||
$(this).siblings("section").slideToggle();
|
||||
});
|
||||
});
|
||||
parent
|
||||
.children(".docstring-article-toggle-button")
|
||||
.prop("title", articleToggleTitle);
|
||||
parent.siblings("section").slideToggle();
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
$(document).on("click", ".docs-article-toggle-button", function (event) {
|
||||
let articleToggleTitle = "Expand docstring";
|
||||
@@ -110,7 +115,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) {
|
||||
debounce(() => {
|
||||
if (isExpanded) {
|
||||
$(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
|
||||
$(".docstring-article-toggle-button")
|
||||
$("a.docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-down")
|
||||
.addClass("fa-chevron-right");
|
||||
|
||||
@@ -119,7 +124,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) {
|
||||
$(".docstring section").slideUp(animationSpeed);
|
||||
} else {
|
||||
$(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
|
||||
$(".docstring-article-toggle-button")
|
||||
$("a.docstring-article-toggle-button")
|
||||
.removeClass("fa-chevron-right")
|
||||
.addClass("fa-chevron-down");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user