Commit e76ab3f5 by Bach Dániel

dashboard: fix TypeError in help.js

parent 11ddfd1e
$(function() {
$('.crosslink').click(function(e) {
e.preventDefault();
......@@ -9,14 +8,15 @@ $(function() {
var hash = window.location.hash;
if(hash) {
var menu;
if($(hash).closest(".tab-pane").prop("class").indexOf("overview") != -1) {
menu = "#overview_menu";
} else {
menu = "#faq_menu";
var pane = $(hash).closest(".tab-pane").prop("class");
if (pane) {
if (pane.indexOf("overview") != -1) {
$("#overview_menu").click();
} else {
$("#faq_menu").click();
}
$("html, body").animate({scrollTop: $(hash).offset().top}, 500);
window.location.hash = hash;
}
$(menu).click();
$("html, body").animate({scrollTop: $(hash).offset().top}, 500);
window.location.hash = hash;
}
});
......@@ -24,14 +24,14 @@
<div class="content">
<ul class="help-tabs nav nav-tabs">
<li class="active">
<a id="faq_menu" href="#" data-toggle="pill" data-target="._faq" class="text-center" >
<a id="faq_menu" href="#faq" data-toggle="pill" data-target="._faq" class="text-center" >
<i class="fa fa-comments-o fa-2x"></i>
<br>
{% trans "FAQ" %}
</a>
</li>
<li>
<a id="overview_menu" href="#" data-toggle="pill" data-target="._overview" class="text-center" >
<a id="overview_menu" href="#overview" data-toggle="pill" data-target="._overview" class="text-center" >
<i class="fa fa-book fa-2x"></i><br>
{% trans "Overview" %}</a>
</li>
......
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 sign in to comment