// Tutorial component based on bootstrap tour var Tutorial = { template: '
', data: function() { return { l10n: { stringPrevShort: '', stringNextShort: '', stringEndShort: '', stringTutoExplainTitle: '', stringTutoExplainContent: '', stringTutoBookTitle: '', stringTutoBookContent: '', stringTutoLibraryButtonTitle: '', stringTutoLibraryButtonContent: '', stringTutoSettingsButtonTitle: '', stringTutoSettingsButtonContent: '', stringTutoFullscreenButtonTitle: '', stringTutoFullscreenButtonContent: '', stringTutoNextButtonTitle: '', stringTutoNextButtonContent: '', stringTutoPrevButtonTitle: '', stringTutoPrevButtonContent: '', } } }, methods: { localized: function(localization) { var vm = this; Object.keys(this.l10n).forEach(function(key, index) { vm.l10n[key] = localization.get(key.substr(6)); }); }, show: function(options) { options = options || {}; var steps = [ { element: "", orphan: true, placement: "bottom", title: this.l10n.stringTutoExplainTitle, content: this.l10n.stringTutoExplainContent }, { element: options.book, placement: "right", title: this.l10n.stringTutoBookTitle, content: this.l10n.stringTutoBookContent }, { element: options.switchbutton, placement: "bottom", title: this.l10n.stringTutoLibraryButtonTitle, content: this.l10n.stringTutoLibraryButtonContent }, { element: options.settingsbutton, placement: "bottom", title: this.l10n.stringTutoSettingsButtonTitle, content: this.l10n.stringTutoSettingsButtonContent }, { element: options.fullscreenbutton, placement: "bottom", title: this.l10n.stringTutoFullscreenButtonTitle, content: this.l10n.stringTutoFullscreenButtonContent }, { element: options.prevbutton, placement: "right", title: this.l10n.stringTutoPrevButtonTitle, content: this.l10n.stringTutoPrevButtonContent }, { element: options.nextbutton, placement: "left", title: this.l10n.stringTutoNextButtonTitle, content: this.l10n.stringTutoNextButtonContent }, ]; var tour = new Tour({ template: "\
\
\

\
\
\
\
\
\
\
\
"+this.l10n.stringPrevShort+"
\
\ |\
\
\
\
\
\
"+this.l10n.stringNextShort+"
\
\
\
\
\
\
\
"+this.l10n.stringEndShort+"
\
\
\
", storage: false, backdrop: true, steps: steps }); tour.init(); tour.start(true); } } }