diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index 1bc5a32..cae5e4e 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -750,7 +750,7 @@ function open_curtain (left=null,right=null,overlay=null,close=null){ container_curtain.classList.remove("open") container_curtain.classList.add("close") } - } else { + } else if (curtain) { if (curtain.classList.contains('first')){ turnOffFirst(curtain) @@ -815,7 +815,14 @@ function curtainMove (curtain,container_curtain,curtain_name,body){ // handler_text.innerHTML = 'Закрыть' // handler_text.style.fontSize = '13px' // } else { - handler_text.innerHTML = curtain_name + let name = '' + if (curtain_name){ + name = curtain_name + } else { + name = curtain.dataset['name'] + } + + handler_text.innerHTML = name handler_text.style.fontSize = '13px' // } diff --git a/templates/tb_base.html b/templates/tb_base.html index fd1d5b6..8b794ab 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -58,11 +58,11 @@ {% include 'blocks/b_header.html' %} -