Commit 91617877 by Kálmán Viktor

dashboard: close tour when user clicks things

parent 659102d8
...@@ -28,7 +28,7 @@ $(function() { ...@@ -28,7 +28,7 @@ $(function() {
$('#vm-migrate-node-list li input:checked').closest('li').addClass('panel-primary'); $('#vm-migrate-node-list li input:checked').closest('li').addClass('panel-primary');
} }
}); });
return false; e.preventDefault();
}); });
/* if the operation fails show the modal again */ /* if the operation fails show the modal again */
......
var intro;
$(function() { $(function() {
$("#vm-details-start-template-tour").click(function() { $("#vm-details-start-template-tour").click(function() {
var intro = introJs(); intro = introJs();
intro.setOptions({ intro.setOptions({
'nextLabel': gettext("Next") + ' <i class="fa fa-chevron-right"></i>', 'nextLabel': gettext("Next") + ' <i class="fa fa-chevron-right"></i>',
'prevLabel': '<i class="fa fa-chevron-left"></i> ' + gettext("Previous"), 'prevLabel': '<i class="fa fa-chevron-left"></i> ' + gettext("Previous"),
...@@ -28,6 +29,11 @@ $(function() { ...@@ -28,6 +29,11 @@ $(function() {
return false; return false;
}); });
$(document).on('click', 'button[type="submit"], a.operation', function() {
if(intro)
intro.exit();
});
}); });
......
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