Commit dc6424cb by Kálmán Viktor

dashboard: fix initial crosslink

parent f2f4b945
...@@ -213,6 +213,7 @@ PIPELINE_JS = { ...@@ -213,6 +213,7 @@ PIPELINE_JS = {
"dashboard/vm-common.js", "dashboard/vm-common.js",
"dashboard/vm-create.js", "dashboard/vm-create.js",
"dashboard/vm-list.js", "dashboard/vm-list.js",
"dashboard/help.js",
"js/host.js", "js/host.js",
"js/network.js", "js/network.js",
"js/switch-port.js", "js/switch-port.js",
......
...@@ -529,16 +529,6 @@ function safe_tags_replace(str) { ...@@ -529,16 +529,6 @@ function safe_tags_replace(str) {
return str.replace(/[&<>]/g, replaceTag); return str.replace(/[&<>]/g, replaceTag);
} }
$('.crosslink').click(function(e) {
// Don't follow the link
event.preventDefault();
var menu = $(this).attr("menu");
$(menu).click();
window.location = this.href;
});
$(function () { $(function () {
var closed = JSON.parse(getCookie('broadcast-messages')); var closed = JSON.parse(getCookie('broadcast-messages'));
$('.broadcast-message').each(function() { $('.broadcast-message').each(function() {
......
$(function() {
$('.crosslink').click(function(e) {
e.preventDefault();
var menu = $(this).data("menu");
$(menu).click();
window.location = this.href;
});
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"
}
$(menu).click();
$("html, body").animate({scrollTop: $(hash).offset().top}, 500);
window.location.hash = hash;
}
});
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
<li>{% trans "Customize this machine - install and remove softwares, etc." %}</li> <li>{% trans "Customize this machine - install and remove softwares, etc." %}</li>
<li>{% trans "Click on ‘Save as Template’ icon on operations." %}</li> <li>{% trans "Click on ‘Save as Template’ icon on operations." %}</li>
<li>{% trans "On the dashboard, select this template to go to the ‘Edit template page’." %}</li> <li>{% trans "On the dashboard, select this template to go to the ‘Edit template page’." %}</li>
<li>{% trans "On the ‘Manage access’ box, add the specified user or user group with ‘user’ access level." %} (<a class="crosslink" menu="#overview_menu" href="#how-can-i-create-groups">{% trans "You can easily create groups if you need" %}</a>)</li> <li>
{% trans "On the ‘Manage access’ box, add the specified user or user group with ‘user’ access level." %}
(<a class="crosslink" data-menu="#overview_menu" href="#how-can-i-create-groups">
{% trans "You can easily create groups if you need" %}</a>)
</li>
</ol> </ol>
</blockquote> </blockquote>
......
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