[MERGE] [IMP] website: tour: nice smooth cool and sexy effect when closing
or ending the tour. bzr revid: tde@openerp.com-20140417162820-bdcpdenddqxzj949
This commit is contained in:
commit
3452694885
|
@ -297,13 +297,31 @@ website.Tour = openerp.Class.extend({
|
|||
$(".popover.tour button")
|
||||
.off()
|
||||
.on("click", function () {
|
||||
var help = $("#help-menu-button");
|
||||
var offset = help.offset();
|
||||
var left = (offset.left > 0) ? (offset.left + help.width()) : offset.left;
|
||||
var top = (help.height() > 0) ? (offset.top + help.height()) : offset.top;
|
||||
|
||||
if ($(this).is("[data-role='next']") && step.element) {
|
||||
$(".popover.tour").remove();
|
||||
}
|
||||
if (step.busy) return;
|
||||
if (!$(this).is("[data-role='next']")) {
|
||||
if (!$(this).is("[data-role='next']") || !step.element) {
|
||||
$('.popover.tour')
|
||||
.animate({
|
||||
left: left,
|
||||
top: top,
|
||||
width: '1px',
|
||||
height: '1px',
|
||||
opacity: 0
|
||||
}, 800,
|
||||
function(){
|
||||
$(".popover.tour").remove();
|
||||
clearTimeout(self.timer);
|
||||
step.busy = true;
|
||||
self.tour.end();
|
||||
self.endTour(callback);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue