tree
This commit is contained in:
@@ -1817,6 +1817,12 @@ body.n_scroll{
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
}
|
}
|
||||||
|
.tree_documentation_container_first_level_txt.chose{
|
||||||
|
color: #0C54A0FF;
|
||||||
|
}
|
||||||
|
.tree_documentation_container_second_level_txt.chose{
|
||||||
|
color: #0C54A0FF;
|
||||||
|
}
|
||||||
.tree_documentation_container_first_level_txt.margin{
|
.tree_documentation_container_first_level_txt.margin{
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -533,8 +533,8 @@ function closeVersionSwitcherOnBody () {
|
|||||||
function choseItemTreeDocumentation (el){
|
function choseItemTreeDocumentation (el){
|
||||||
let $tree = el.closest(".tree_documentation_container")
|
let $tree = el.closest(".tree_documentation_container")
|
||||||
let $allChosingElementsTreeThirdLevel = $($tree).find(".element_third_level_content_part_tree")
|
let $allChosingElementsTreeThirdLevel = $($tree).find(".element_third_level_content_part_tree")
|
||||||
let $allChosingElementsTreeSecondLevel = $($tree).find(".element_third_level_content_part_tree")
|
let $allChosingElementsTreeSecondLevel = $($tree).find(".tree_documentation_container_second_level_txt")
|
||||||
let $allChosingElementsTreeFirstLevel = $($tree).find(".element_third_level_content_part_tree")
|
let $allChosingElementsTreeFirstLevel = $($tree).find(".tree_documentation_container_first_level_txt")
|
||||||
$allChosingElementsTreeThirdLevel.each(function (){
|
$allChosingElementsTreeThirdLevel.each(function (){
|
||||||
if (el !== this){
|
if (el !== this){
|
||||||
this.classList.remove("chose")
|
this.classList.remove("chose")
|
||||||
@@ -552,11 +552,19 @@ function choseItemTreeDocumentation (el){
|
|||||||
})
|
})
|
||||||
|
|
||||||
el.classList.add("chose")
|
el.classList.add("chose")
|
||||||
|
|
||||||
|
let url = window.location.origin + el.dataset['url']
|
||||||
|
|
||||||
|
window.location.href = url
|
||||||
}
|
}
|
||||||
|
|
||||||
function showContentPartTree (el) {
|
function showContentPartTree (el) {
|
||||||
let $parent = el.parentNode
|
let $parent = el.parentNode
|
||||||
let $content_part = $parent.querySelector(".content_part_tree_documentation_container")
|
let $content_part = $parent.querySelector(".content_part_tree_documentation_container")
|
||||||
|
if (!$content_part){
|
||||||
|
$parent = $parent.parentNode
|
||||||
|
$content_part = $parent.querySelector(".content_part_tree_documentation_container")
|
||||||
|
}
|
||||||
let $arrow = $parent.querySelector(".tree_documentation_arrow_img")
|
let $arrow = $parent.querySelector(".tree_documentation_arrow_img")
|
||||||
$content_part.classList.toggle("hidden")
|
$content_part.classList.toggle("hidden")
|
||||||
if ($arrow.style.rotate === '0deg' || $arrow.style.rotate === ''){
|
if ($arrow.style.rotate === '0deg' || $arrow.style.rotate === ''){
|
||||||
|
|||||||
@@ -54,14 +54,14 @@
|
|||||||
<div class="tree_documentation_container">
|
<div class="tree_documentation_container">
|
||||||
{% for name, obj in doc_tree.items %}
|
{% for name, obj in doc_tree.items %}
|
||||||
<div class="tree_documentation_container_first_level">
|
<div class="tree_documentation_container_first_level">
|
||||||
<div class="tree_documentation_container_first_line" onclick="showContentPartTree(this)">
|
<div class="tree_documentation_container_first_line">
|
||||||
{% if obj.children %}
|
{% if obj.children %}
|
||||||
<picture class="tree_documentation_arrow_picture">
|
<picture class="tree_documentation_arrow_picture" onclick="showContentPartTree(this)">
|
||||||
<source srcset="{% static "images/arrow_for_documentation_switcher.svg" %}">
|
<source srcset="{% static "images/arrow_for_documentation_switcher.svg" %}">
|
||||||
<img class="tree_documentation_arrow_img" src="{% static "images/arrow_for_documentation_switcher.svg" %}" alt="">
|
<img class="tree_documentation_arrow_img" src="{% static "images/arrow_for_documentation_switcher.svg" %}" alt="">
|
||||||
</picture>
|
</picture>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="tree_documentation_container_first_level_txt {% if not obj.children %}margin{% endif %}">
|
<div class="tree_documentation_container_first_level_txt {% if not obj.children %}margin{% endif %}" onclick="choseItemTreeDocumentation(this)" data-url="{% url 'docs_art_page' cur_version.url obj.url %}">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,14 +70,14 @@
|
|||||||
{% for name, obj in obj.children.items %}
|
{% for name, obj in obj.children.items %}
|
||||||
|
|
||||||
<div class="tree_documentation_container_second_level">
|
<div class="tree_documentation_container_second_level">
|
||||||
<div class="tree_documentation_container_first_line" onclick="showContentPartTree(this)">
|
<div class="tree_documentation_container_first_line">
|
||||||
{% if obj.children %}
|
{% if obj.children %}
|
||||||
<picture class="tree_documentation_arrow_picture">
|
<picture class="tree_documentation_arrow_picture" onclick="showContentPartTree(this)">
|
||||||
<source srcset="{% static "images/arrow_for_documentation_switcher.svg" %}">
|
<source srcset="{% static "images/arrow_for_documentation_switcher.svg" %}">
|
||||||
<img class="tree_documentation_arrow_img" src="{% static "images/arrow_for_documentation_switcher.svg" %}" alt="">
|
<img class="tree_documentation_arrow_img" src="{% static "images/arrow_for_documentation_switcher.svg" %}" alt="">
|
||||||
</picture>
|
</picture>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="tree_documentation_container_second_level_txt {% if not obj.children %}margin{% endif %}">
|
<div class="tree_documentation_container_second_level_txt {% if not obj.children %}margin{% endif %}" data-url="{% url 'docs_art_page' cur_version.url obj.url %}" onclick="choseItemTreeDocumentation(this)">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,16 +85,16 @@
|
|||||||
{% for name,obj in obj.children.items %}
|
{% for name,obj in obj.children.items %}
|
||||||
<div class="content_part_tree_documentation_container min_padding hidden">
|
<div class="content_part_tree_documentation_container min_padding hidden">
|
||||||
<div class="elements_third_level_content_part_tree">
|
<div class="elements_third_level_content_part_tree">
|
||||||
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)">
|
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)" data-url="{% url 'docs_art_page' cur_version.url obj.url %}">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)">
|
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)" data-url="{% url 'docs_art_page' cur_version.url obj.url %}">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)">
|
<div class="element_third_level_content_part_tree" onclick="choseItemTreeDocumentation(this)" data-url="{% url 'docs_art_page' cur_version.url obj.url %}">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="element_third_level_content_part_tree chose" onclick="choseItemTreeDocumentation(this)">
|
<div class="element_third_level_content_part_tree chose" onclick="choseItemTreeDocumentation(this)" data-url="{% url 'docs_art_page' cur_version.url obj.url %}">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user