Commit 542ebeb1 by Kálmán Viktor

dashboard: abort tour if user clicks on things

parent 91617877
......@@ -28,7 +28,7 @@ $(function() {
});
/* save resources */
$('#vm-details-resources-save').click(function() {
$('#vm-details-resources-save').click(function(e) {
var error = false;
$(".cpu-count-input, .ram-input").each(function() {
if(!$(this)[0].checkValidity()) {
......@@ -61,7 +61,7 @@ $(function() {
}
}
});
return false;
e.preventDefault();
});
/* remove tag */
......@@ -205,11 +205,11 @@ $(function() {
});
/* rename in home tab */
$(".vm-details-home-edit-name-click").click(function() {
$(".vm-details-home-edit-name-click").click(function(e) {
$(".vm-details-home-edit-name-click").hide();
$("#vm-details-home-rename").show();
$("input", $("#vm-details-home-rename")).select();
return false;
e.preventDefault();
});
/* rename ajax */
......@@ -236,7 +236,7 @@ $(function() {
});
/* update description click */
$(".vm-details-home-edit-description-click").click(function() {
$(".vm-details-home-edit-description-click").click(function(e) {
$(".vm-details-home-edit-description-click").hide();
$("#vm-details-home-description").show();
var ta = $("#vm-details-home-description textarea");
......@@ -244,7 +244,7 @@ $(function() {
ta.val("");
ta.focus();
ta.val(tmp)
return false;
e.preventDefault();
});
/* description update ajax */
......
......@@ -30,7 +30,7 @@ $(function() {
return false;
});
$(document).on('click', 'button[type="submit"], a.operation', function() {
$(document).on('click', '#vm-details-resources-save, .vm-details-home-edit-name-click, .vm-details-home-edit-description-click, a.operation', function() {
if(intro)
intro.exit();
});
......@@ -54,9 +54,7 @@ function get_steps() {
{
element: document.querySelector("#vm-details-start-template-tour"),
intro: "<p>" + gettext("Welcome to the template tutorial. In this quick tour, we gonna show you how to do the steps described above.") + "</p>" +
"<p>" + gettext('For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).') + "</p>" +
"<p>" + gettext("During the tour please <strong>don't try</strong> the functions because it may lead to graphical glitches, however you can end the tour any time you want with the End Tour button.") +
"</p>",
"<p>" + gettext('For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).') + "</p>"
},
{
element: document.querySelector('a[href="#home"]'),
......
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