Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Take the tour update
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhemmarchand committed Aug 16, 2016
1 parent a21a1e6 commit d9f8645
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions appserver/static/components/scc_takethetour/scc_takethetour.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ define(function(require, exports, module) {
no_more_label: "Do not show this tour again",
hide_container: false,
show_credits: false,
cookie_name_suffix: ""
cookie_name_suffix: "",
backdrop_close: true,
keyboard_close: true
},

initialize: function() {
Expand Down Expand Up @@ -186,6 +188,10 @@ define(function(require, exports, module) {
isScrollNeeded();
});

// Treat "backdrop_close" and "keyboard_close" settings
var modal_backdrop = this.settings.get('backdrop_close') === true ? true : 'static';
var modal_keyboard = this.settings.get('keyboard_close') === true ? true : false;

$modal
.on('shown.bs.modal', function(e){
// Prevents page body scrolling if modal content is scrollable
Expand All @@ -201,7 +207,10 @@ define(function(require, exports, module) {
setCookie(ck_name);
}
})
.modal('show');
.modal({
backdrop: modal_backdrop,
keyboard: modal_keyboard
});
}

return this;
Expand Down
2 changes: 1 addition & 1 deletion default/data/ui/views/Home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"title":"Nmon Performance : Take the tour !",
"close_btn_label":"Close",
"no_more_label":"Do not show this again",
"no_more_cookie_name":"scc_takethetour_v1.7.5",
"cookie_name_suffix":"nmon_app_for_splunk_v1.7.5",
"hide_container":false,
"show_credits":true
}'>
Expand Down

0 comments on commit d9f8645

Please sign in to comment.