[FIX] Tour reset bug

bzr revid: ddm@openerp.com-20131009152015-s2p3hjkivls16yk2
This commit is contained in:
ddm 2013-10-09 17:20:15 +02:00
parent a0894db053
commit 75bf46996c
4 changed files with 23 additions and 23 deletions

View File

@ -564,18 +564,6 @@ table.editorbar-panel td.selected {
-o-border-radius: 0.4em;
border-radius: 0.4em;
}
.oe_seo_configuration .keyword-in-title {
background-color: #5cb85cpointer;
color: white;
}
.oe_seo_configuration .keyword-in-description {
background-color: #428bca;
color: white;
}
.oe_seo_configuration .keyword-in-body {
background-color: #5bc0de;
color: white;
}
/* ---- ACE EDITOR ---- */
.oe_ace_view_editor {
@ -634,6 +622,10 @@ table.editorbar-panel td.selected {
}
/* ---- EDITOR TOUR ---- */
div.tour-backdrop {
z-index: 2009;
}
.popover.tour {
z-index: 2010;
}

View File

@ -479,7 +479,8 @@ $navbar_height: 51px
+opacity(0)
/* ---- EDITOR TOUR ---- */
div.tour-backdrop
z-index: 2009
.popover.tour
z-index: 2010
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:

View File

@ -26,6 +26,7 @@
reset: function () {
this.tourStorage.removeItem(this.id+'_current_step');
this.tourStorage.removeItem(this.id+'_end');
this.tour._current = 0;
$('.popover.tour').remove();
},
start: function () {
@ -34,7 +35,7 @@
}
},
canResume: function () {
return this.currentStepIndex() === 0 && !this.tour.ended();
return (this.currentStepIndex() === 0) && !this.tour.ended();
},
currentStepIndex: function () {
var index = this.tourStorage.getItem(this.id+'_current_step') || 0;
@ -91,8 +92,9 @@
{
stepId: 'add-banner',
orphan: true,
backdrop: true,
title: "Now, let's add a banner",
content: "Let's add a banner on the top of the page to make your homepage look more attractive.",
content: "Let's add a banner on the top of the page to make your homepage more attractive.",
template: render('website.tour_confirm', { next: "Continue" }),
},
{
@ -130,8 +132,8 @@
element: '#wrap [data-snippet-id=carousel]:first .carousel-caption',
placement: 'top',
title: "Set your Banner text",
content: "Click on the text to start modifying it then click <em>Done</em> to continue the tutorial.<br>You can also use the options of the top menubar to change the look of the banner. ",
template: render('website.tour_confirm', { next: "Done" }),
content: "Click on the text to start modifying it then click <em>Continue</em> to continue the tutorial.<br>You can also use the options of the top menubar to change the look of the banner. ",
template: render('website.tour_confirm', { next: "Continue" }),
onHide: function () {
var $banner = $("#wrap [data-snippet-id=carousel]:first");
if ($banner.length) {
@ -144,8 +146,8 @@
element: '.oe_overlay_options .oe_options',
placement: 'left',
title: "Customize your new Banner style",
content: "Click on <em>Customize</em> and change the background of your banner.",
template: render('website.tour_confirm', { next: "Not now" }),
content: "Click on <em>Customize</em> and change the background of your banner.<br>If your are satisfied with the current background, just click <em>Continue</em>.",
template: render('website.tour_confirm', { next: "Continue" }),
onShow: function () {
$('.dropdown-menu [name=carousel-background]').click(function () {
self.movetoStep('save-changes');
@ -168,6 +170,7 @@
{
stepId: 'part-2',
orphan: true,
backdrop: true,
title: "Congratutaltions!",
content: "Congratulations on your first modifications.",
template: render('website.tour_confirm', { next: "OK" }),
@ -226,6 +229,10 @@
if (url.search === '?tutorial=true' || website.tutorials.basic.startOfPart2()) {
website.tutorials.basic.start();
}
$('.tour-backdrop').click(function (e) {
e.stopImmediatePropagation();
e.preventDefault();
});
return this._super();
},
});

View File

@ -13,7 +13,7 @@
<h3 class="popover-title"></h3>
<div class="popover-content"></div>
<nav class="popover-navigation">
<button class="btn btn-sm btn-default" data-role="next"><t t-esc="next"/></button>
<button class="btn btn-sm btn-success" data-role="next"><t t-esc="next"/></button>
</nav>
</div>
</t>
@ -23,7 +23,7 @@
<h3 class="popover-title"></h3>
<div class="popover-content"></div>
<nav class="popover-navigation">
<button class="btn btn-sm btn-default" data-role="end"><t t-esc="end"/></button>
<button class="btn btn-sm btn-danger" data-role="end"><t t-esc="end"/></button>
</nav>
</div>
</t>
@ -33,8 +33,8 @@
<h3 class="popover-title"></h3>
<div class="popover-content"></div>
<nav class="popover-navigation">
<button class="btn btn-sm btn-default" data-role="next"><t t-esc="next"/></button>
<button class="btn btn-sm btn-default" data-role="end"><t t-esc="end"/></button>
<button class="btn btn-sm btn-success" data-role="next"><t t-esc="next"/></button>
<button class="btn btn-sm btn-danger" data-role="end"><t t-esc="end"/></button>
</nav>
</div>
</t>