feat(tour): ESC to perma-close #4886 @lemoness @alys

This commit is contained in:
Tyler Renelle
2015-03-19 14:40:28 -06:00
parent 152853a877
commit cca2d81bc3

View File

@@ -135,6 +135,7 @@ function($rootScope, User, $timeout, $state) {
var tour = {};
_.each(chapters, function(v,k){
tour[k] = new Tour({
name: k,
backdrop: true,
template: function(i,step){
return '<div class="popover" role="tooltip"> ' +
@@ -204,6 +205,12 @@ function($rootScope, User, $timeout, $state) {
});
});
$(document).on("keyup.tour-intro", function(e) {
if (e.which == 27) {
return User.set({'flags.tour.intro':-1});
}
})
return {
goto: goto
};