mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[REF] *: convert odoo module by native one
This commit converts all odoo module of this repo by native module. The goal is to depreciate odoo.define in favor of native module and then simplify boot.js by removing the regexp that finds module dependencies. task id: 3162300 closes odoo/design-themes#652 Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
odoo.define('theme_common.compatibility_editor', function (require) {
|
||||
'use strict';
|
||||
/** @odoo-module **/
|
||||
|
||||
var sOptions = require('web_editor.snippets.options');
|
||||
import sOptions from "web_editor.snippets.options";
|
||||
|
||||
sOptions.registry.BackgroundImage.include({
|
||||
/**
|
||||
@@ -16,4 +15,3 @@ sOptions.registry.BackgroundImage.include({
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
odoo.define('theme_common.preheader', function (require) {
|
||||
'use strict';
|
||||
/** @odoo-module **/
|
||||
|
||||
var publicWidget = require('web.public.widget');
|
||||
require('website.content.menu');
|
||||
import publicWidget from "web.public.widget";
|
||||
import "website.content.menu";
|
||||
|
||||
publicWidget.registry.StandardAffixedHeader.include({
|
||||
/**
|
||||
@@ -111,5 +110,3 @@ const BaseDisappearingPreheader = {
|
||||
|
||||
publicWidget.registry.DisappearingHeader.include(BaseDisappearingPreheader);
|
||||
publicWidget.registry.FadeOutHeader.include(BaseDisappearingPreheader);
|
||||
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
odoo.define('theme_common.s_animated_boxes_frontend', function (require) {
|
||||
'use strict';
|
||||
/** @odoo-module **/
|
||||
|
||||
var publicWidget = require('web.public.widget');
|
||||
import publicWidget from "web.public.widget";
|
||||
|
||||
/**
|
||||
* This is a fix for some apple devices.
|
||||
@@ -12,4 +11,3 @@ var publicWidget = require('web.public.widget');
|
||||
publicWidget.registry._fixAnimatedBoxesAppleClick = publicWidget.registry._fixAppleCollapse.extend({
|
||||
selector: '.s_animated_boxes .item',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,122 +1,120 @@
|
||||
odoo.define('theme_common.s_css_slider_frontend', function (require) {
|
||||
'use strict';
|
||||
/** @odoo-module **/
|
||||
|
||||
var publicWidget = require('web.public.widget');
|
||||
import publicWidget from "web.public.widget";
|
||||
|
||||
publicWidget.registry.s_css_slider = publicWidget.Widget.extend({
|
||||
selector: ".s_css_slider",
|
||||
disabledInEditableMode: false,
|
||||
publicWidget.registry.s_css_slider = publicWidget.Widget.extend({
|
||||
selector: ".s_css_slider",
|
||||
disabledInEditableMode: false,
|
||||
|
||||
start: function () {
|
||||
var self = this;
|
||||
var $container = self.$el;
|
||||
$container.find(".s_css_slider_pagination").remove();
|
||||
// create slider pagination
|
||||
var sliderPagination = self.createSliderPagination($container);
|
||||
self.bindEvents($container, sliderPagination);
|
||||
$(window).on("resize", function () {
|
||||
self.resizeImgs($container);
|
||||
}).trigger("resize");
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
start: function () {
|
||||
var self = this;
|
||||
var $container = self.$el;
|
||||
$container.find(".s_css_slider_pagination").remove();
|
||||
// create slider pagination
|
||||
var sliderPagination = self.createSliderPagination($container);
|
||||
self.bindEvents($container, sliderPagination);
|
||||
$(window).on("resize", function () {
|
||||
self.resizeImgs($container);
|
||||
}).trigger("resize");
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
bindEvents: function ($container, sliderPagination) {
|
||||
var self = this,
|
||||
$next_btn = $container.find('.next'),
|
||||
$prev_btn = $container.find('.prev');
|
||||
bindEvents: function ($container, sliderPagination) {
|
||||
var self = this,
|
||||
$next_btn = $container.find('.next'),
|
||||
$prev_btn = $container.find('.prev');
|
||||
|
||||
$next_btn.on('click.s_css', function (e) {
|
||||
self.nextSlide($container, sliderPagination);
|
||||
});
|
||||
$next_btn.on('click.s_css', function (e) {
|
||||
self.nextSlide($container, sliderPagination);
|
||||
});
|
||||
|
||||
$prev_btn.on('click.s_css', function (e) {
|
||||
self.prevSlide($container, sliderPagination);
|
||||
});
|
||||
$prev_btn.on('click.s_css', function (e) {
|
||||
self.prevSlide($container, sliderPagination);
|
||||
});
|
||||
|
||||
if ($container.hasClass("autoplay") && this.editableMode !== true) {
|
||||
var interval;
|
||||
var autoplay = function () {
|
||||
interval = setInterval(function () {
|
||||
if (!$next_btn.hasClass("inactive")) {
|
||||
self.nextSlide($container, sliderPagination);
|
||||
} else {
|
||||
self.prevSlide($container, sliderPagination, 0);
|
||||
}
|
||||
}, 3000);
|
||||
};
|
||||
autoplay();
|
||||
$container.hover(function () { clearInterval(interval); });
|
||||
$container.mouseleave(function () { autoplay(); });
|
||||
}
|
||||
|
||||
sliderPagination.on('click.s_css', function () {
|
||||
var selectedDot = $(this);
|
||||
if (!selectedDot.hasClass('selected')) {
|
||||
var selectedPosition = selectedDot.index(),
|
||||
activePosition = $container.find('.slider .selected').index();
|
||||
if ( activePosition < selectedPosition) {
|
||||
self.nextSlide($container, sliderPagination, selectedPosition);
|
||||
if ($container.hasClass("autoplay") && this.editableMode !== true) {
|
||||
var interval;
|
||||
var autoplay = function () {
|
||||
interval = setInterval(function () {
|
||||
if (!$next_btn.hasClass("inactive")) {
|
||||
self.nextSlide($container, sliderPagination);
|
||||
} else {
|
||||
self.prevSlide($container, sliderPagination, selectedPosition);
|
||||
self.prevSlide($container, sliderPagination, 0);
|
||||
}
|
||||
}, 3000);
|
||||
};
|
||||
autoplay();
|
||||
$container.hover(function () { clearInterval(interval); });
|
||||
$container.mouseleave(function () { autoplay(); });
|
||||
}
|
||||
|
||||
sliderPagination.on('click.s_css', function () {
|
||||
var selectedDot = $(this);
|
||||
if (!selectedDot.hasClass('selected')) {
|
||||
var selectedPosition = selectedDot.index(),
|
||||
activePosition = $container.find('.slider .selected').index();
|
||||
if ( activePosition < selectedPosition) {
|
||||
self.nextSlide($container, sliderPagination, selectedPosition);
|
||||
} else {
|
||||
self.prevSlide($container, sliderPagination, selectedPosition);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
resizeImgs: function ($container) {
|
||||
var cont_h = $container.height(),
|
||||
imgs = $container.find(".slide img");
|
||||
resizeImgs: function ($container) {
|
||||
var cont_h = $container.height(),
|
||||
imgs = $container.find(".slide img");
|
||||
|
||||
imgs.each(function () {
|
||||
var $img = $(this),
|
||||
img_h = $img.height();
|
||||
if (img_h > cont_h) {
|
||||
$img.css("width", "100%");
|
||||
$img.css("margin-top", (cont_h - img_h)/2);
|
||||
}
|
||||
});
|
||||
},
|
||||
imgs.each(function () {
|
||||
var $img = $(this),
|
||||
img_h = $img.height();
|
||||
if (img_h > cont_h) {
|
||||
$img.css("width", "100%");
|
||||
$img.css("margin-top", (cont_h - img_h)/2);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
createSliderPagination: function ($container) {
|
||||
var wrapper = $('<ul class="s_css_slider_pagination"></ul>').insertAfter($container.find('.navigation'));
|
||||
$container.find('.slider .slide').each(function (index) {
|
||||
var dotWrapper = (index === 0) ? $('<li class="selected"></li>') : $('<li></li>'),
|
||||
dot = $('<a href="#0"></a>').appendTo(dotWrapper);
|
||||
dotWrapper.appendTo(wrapper);
|
||||
dot.text(index+1);
|
||||
});
|
||||
return wrapper.children('li');
|
||||
},
|
||||
createSliderPagination: function ($container) {
|
||||
var wrapper = $('<ul class="s_css_slider_pagination"></ul>').insertAfter($container.find('.navigation'));
|
||||
$container.find('.slider .slide').each(function (index) {
|
||||
var dotWrapper = (index === 0) ? $('<li class="selected"></li>') : $('<li></li>'),
|
||||
dot = $('<a href="#0"></a>').appendTo(dotWrapper);
|
||||
dotWrapper.appendTo(wrapper);
|
||||
dot.text(index+1);
|
||||
});
|
||||
return wrapper.children('li');
|
||||
},
|
||||
|
||||
nextSlide: function ($container, $pagination, $n) {
|
||||
var self = this,
|
||||
visibleSlide = $container.find('.slider .selected'),
|
||||
navigationDot = $container.find('.s_css_slider_pagination .selected');
|
||||
nextSlide: function ($container, $pagination, $n) {
|
||||
var self = this,
|
||||
visibleSlide = $container.find('.slider .selected'),
|
||||
navigationDot = $container.find('.s_css_slider_pagination .selected');
|
||||
|
||||
if (typeof $n === 'undefined') $n = visibleSlide.index() + 1;
|
||||
visibleSlide.removeClass('selected');
|
||||
$container.find('.slider .slide').eq($n).addClass('selected').prevAll().addClass('move-left');
|
||||
navigationDot.removeClass('selected');
|
||||
$pagination.eq($n).addClass('selected');
|
||||
self.updateNavigation($container, $container.find('.slider .slide').eq($n));
|
||||
},
|
||||
if (typeof $n === 'undefined') $n = visibleSlide.index() + 1;
|
||||
visibleSlide.removeClass('selected');
|
||||
$container.find('.slider .slide').eq($n).addClass('selected').prevAll().addClass('move-left');
|
||||
navigationDot.removeClass('selected');
|
||||
$pagination.eq($n).addClass('selected');
|
||||
self.updateNavigation($container, $container.find('.slider .slide').eq($n));
|
||||
},
|
||||
|
||||
prevSlide: function ($container, $pagination, $n) {
|
||||
var self = this,
|
||||
visibleSlide = $container.find('.slider .selected'),
|
||||
navigationDot = $container.find('.s_css_slider_pagination .selected');
|
||||
prevSlide: function ($container, $pagination, $n) {
|
||||
var self = this,
|
||||
visibleSlide = $container.find('.slider .selected'),
|
||||
navigationDot = $container.find('.s_css_slider_pagination .selected');
|
||||
|
||||
if (typeof $n === 'undefined') $n = visibleSlide.index() - 1;
|
||||
visibleSlide.removeClass('selected');
|
||||
$container.find('.slider .slide').eq($n).addClass('selected').removeClass('move-left').nextAll().removeClass('move-left');
|
||||
navigationDot.removeClass('selected');
|
||||
$pagination.eq($n).addClass('selected');
|
||||
self.updateNavigation($container, $container.find('.slider .slide').eq($n));
|
||||
},
|
||||
if (typeof $n === 'undefined') $n = visibleSlide.index() - 1;
|
||||
visibleSlide.removeClass('selected');
|
||||
$container.find('.slider .slide').eq($n).addClass('selected').removeClass('move-left').nextAll().removeClass('move-left');
|
||||
navigationDot.removeClass('selected');
|
||||
$pagination.eq($n).addClass('selected');
|
||||
self.updateNavigation($container, $container.find('.slider .slide').eq($n));
|
||||
},
|
||||
|
||||
updateNavigation: function ($container, $active) {
|
||||
$container.find('.prev').toggleClass('inactive', $active.is(':first-child'));
|
||||
$container.find('.next').toggleClass('inactive', $active.is(':last-child'));
|
||||
},
|
||||
});
|
||||
updateNavigation: function ($container, $active) {
|
||||
$container.find('.prev').toggleClass('inactive', $active.is(':first-child'));
|
||||
$container.find('.next').toggleClass('inactive', $active.is(':last-child'));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
odoo.define('theme_common.s_mini_nav_bar', function (require) {
|
||||
'use strict';
|
||||
/** @odoo-module **/
|
||||
|
||||
const dom = require('web.dom');
|
||||
var publicWidget = require('web.public.widget');
|
||||
import dom from "web.dom";
|
||||
import publicWidget from "web.public.widget";
|
||||
|
||||
publicWidget.registry.miniNavbarScroll = publicWidget.Widget.extend({
|
||||
selector: '.s_mini_nav_bar a[href*="#"]:not([href="#"])',
|
||||
@@ -28,4 +27,3 @@ publicWidget.registry.miniNavbarScroll = publicWidget.Widget.extend({
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,132 +1,130 @@
|
||||
odoo.define("theme_common.s_showcase_slider_frontend", function (require) {
|
||||
"use strict";
|
||||
/** @odoo-module **/
|
||||
|
||||
const dom = require('web.dom');
|
||||
var publicWidget = require('web.public.widget');
|
||||
import dom from "web.dom";
|
||||
import publicWidget from "web.public.widget";
|
||||
|
||||
publicWidget.registry.s_showcase_slider = publicWidget.Widget.extend({
|
||||
selector: ".s_showcase_slider",
|
||||
publicWidget.registry.s_showcase_slider = publicWidget.Widget.extend({
|
||||
selector: ".s_showcase_slider",
|
||||
|
||||
start: function () {
|
||||
_.defer(this.bindEvents.bind(this)); // FIXME delayed to counter a web_editor bug which off all click event
|
||||
this.createPagination();
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
start: function () {
|
||||
_.defer(this.bindEvents.bind(this)); // FIXME delayed to counter a web_editor bug which off all click event
|
||||
this.createPagination();
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
this._super.apply(this, arguments);
|
||||
_.defer(this.unbindEvents.bind(this)); // FIXME delayed to counter a web_editor bug which off all click event
|
||||
this.destroyPagination();
|
||||
destroy: function () {
|
||||
this._super.apply(this, arguments);
|
||||
_.defer(this.unbindEvents.bind(this)); // FIXME delayed to counter a web_editor bug which off all click event
|
||||
this.destroyPagination();
|
||||
this.$el.removeClass("active");
|
||||
},
|
||||
|
||||
bindEvents: function () {
|
||||
// Enlarge image on click if not already enlarged
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_slider", (function (e) {
|
||||
if (this.$el.hasClass("active")) return;
|
||||
|
||||
this.$el
|
||||
.addClass("active")
|
||||
.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", (function () {
|
||||
dom.scrollTo(this.el, {
|
||||
duration: 200,
|
||||
extraOffset: 70,
|
||||
});
|
||||
this.$el.trigger("transitionIsFinished");
|
||||
}).bind(this));
|
||||
}).bind(this));
|
||||
|
||||
// Close the enlarged image on close icon click
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_close", (function (e) {
|
||||
this.$el.removeClass("active");
|
||||
},
|
||||
}).bind(this));
|
||||
|
||||
bindEvents: function () {
|
||||
// Enlarge image on click if not already enlarged
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_slider", (function (e) {
|
||||
if (this.$el.hasClass("active")) return;
|
||||
// Handle click navigation
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_prev", this.prevSlide.bind(this));
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_next", this.nextSlide.bind(this));
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_slider_pagination > li > a", (function (e) {
|
||||
e.preventDefault();
|
||||
var $selectedDot = $(e.currentTarget).parent();
|
||||
if ($selectedDot.hasClass("selected")) return;
|
||||
this.changeSlide($selectedDot.index());
|
||||
}).bind(this));
|
||||
|
||||
this.$el
|
||||
.addClass("active")
|
||||
.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", (function () {
|
||||
dom.scrollTo(this.el, {
|
||||
duration: 200,
|
||||
extraOffset: 70,
|
||||
});
|
||||
this.$el.trigger("transitionIsFinished");
|
||||
}).bind(this));
|
||||
}).bind(this));
|
||||
// Keyboard slider navigation
|
||||
$(document).on("keyup.s_showcase_slider", (function (e) {
|
||||
if (!this.$el.hasClass("active")) return;
|
||||
|
||||
// Close the enlarged image on close icon click
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_close", (function (e) {
|
||||
this.$el.removeClass("active");
|
||||
}).bind(this));
|
||||
|
||||
// Handle click navigation
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_prev", this.prevSlide.bind(this));
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_next", this.nextSlide.bind(this));
|
||||
this.$el.on("click.s_showcase_slider", ".s_ss_slider_pagination > li > a", (function (e) {
|
||||
e.preventDefault();
|
||||
var $selectedDot = $(e.currentTarget).parent();
|
||||
if ($selectedDot.hasClass("selected")) return;
|
||||
this.changeSlide($selectedDot.index());
|
||||
}).bind(this));
|
||||
|
||||
// Keyboard slider navigation
|
||||
$(document).on("keyup.s_showcase_slider", (function (e) {
|
||||
if (!this.$el.hasClass("active")) return;
|
||||
|
||||
switch (e.which) {
|
||||
case $.ui.keyCode.LEFT:
|
||||
this.prevSlide();
|
||||
break;
|
||||
case $.ui.keyCode.RIGHT:
|
||||
this.nextSlide();
|
||||
break;
|
||||
case $.ui.keyCode.ESCAPE:
|
||||
this.$el.removeClass("active");
|
||||
break;
|
||||
}
|
||||
}).bind(this));
|
||||
},
|
||||
|
||||
unbindEvents: function () {
|
||||
this.$el.off(".s_showcase_slider");
|
||||
$(document).off(".s_showcase_slider");
|
||||
},
|
||||
|
||||
createPagination: function () { // FIXME pagination should be saved with editor but keep this for compatibility
|
||||
this.$el.find(".s_ss_slider_pagination").remove(); // Remove saved-with-editor pagination
|
||||
|
||||
this.$pagination = $("<ul/>", {class: "s_ss_slider_pagination"});
|
||||
this.$pagination.insertAfter(this.$el.find(".s_ss_slider_navigation"));
|
||||
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
for (var i = 0 ; i < nbSlides ; i++) {
|
||||
this.$pagination.append("<li><a href=\"#\"></a></li>");
|
||||
switch (e.which) {
|
||||
case $.ui.keyCode.LEFT:
|
||||
this.prevSlide();
|
||||
break;
|
||||
case $.ui.keyCode.RIGHT:
|
||||
this.nextSlide();
|
||||
break;
|
||||
case $.ui.keyCode.ESCAPE:
|
||||
this.$el.removeClass("active");
|
||||
break;
|
||||
}
|
||||
}).bind(this));
|
||||
},
|
||||
|
||||
this.$pagination.children().eq(this.getCurrentIndex()).addClass("selected");
|
||||
},
|
||||
unbindEvents: function () {
|
||||
this.$el.off(".s_showcase_slider");
|
||||
$(document).off(".s_showcase_slider");
|
||||
},
|
||||
|
||||
destroyPagination: function () {
|
||||
if (this.$pagination) {
|
||||
this.$pagination.remove();
|
||||
this.$pagination = null;
|
||||
}
|
||||
},
|
||||
createPagination: function () { // FIXME pagination should be saved with editor but keep this for compatibility
|
||||
this.$el.find(".s_ss_slider_pagination").remove(); // Remove saved-with-editor pagination
|
||||
|
||||
prevSlide: function () {
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
var currentIndex = this.getCurrentIndex();
|
||||
this.changeSlide(currentIndex > 0 ? (currentIndex - 1) : (nbSlides - 1));
|
||||
},
|
||||
this.$pagination = $("<ul/>", {class: "s_ss_slider_pagination"});
|
||||
this.$pagination.insertAfter(this.$el.find(".s_ss_slider_navigation"));
|
||||
|
||||
nextSlide: function () {
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
var currentIndex = this.getCurrentIndex();
|
||||
this.changeSlide((currentIndex + 1) % nbSlides);
|
||||
},
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
for (var i = 0 ; i < nbSlides ; i++) {
|
||||
this.$pagination.append("<li><a href=\"#\"></a></li>");
|
||||
}
|
||||
|
||||
getCurrentIndex: function () {
|
||||
return this.$el.find(".s_ss_slider > .selected").index();
|
||||
},
|
||||
this.$pagination.children().eq(this.getCurrentIndex()).addClass("selected");
|
||||
},
|
||||
|
||||
changeSlide: function (n) {
|
||||
var $slides = this.$el.find(".s_ss_slider > li").removeClass("selected");
|
||||
this.$el.find(".s_ss_slider_pagination > li").removeClass("selected");
|
||||
destroyPagination: function () {
|
||||
if (this.$pagination) {
|
||||
this.$pagination.remove();
|
||||
this.$pagination = null;
|
||||
}
|
||||
},
|
||||
|
||||
var $slide = $slides.eq(n).addClass("selected");
|
||||
$slides.removeClass("move-left");
|
||||
$slide.prevAll().addClass("move-left");
|
||||
prevSlide: function () {
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
var currentIndex = this.getCurrentIndex();
|
||||
this.changeSlide(currentIndex > 0 ? (currentIndex - 1) : (nbSlides - 1));
|
||||
},
|
||||
|
||||
this.$pagination.children().eq(n).addClass("selected");
|
||||
this.updateNavigation();
|
||||
},
|
||||
nextSlide: function () {
|
||||
var nbSlides = this.$el.find(".s_ss_slider").children().length;
|
||||
var currentIndex = this.getCurrentIndex();
|
||||
this.changeSlide((currentIndex + 1) % nbSlides);
|
||||
},
|
||||
|
||||
updateNavigation: function () {
|
||||
var $active = this.$el.find(".s_ss_slider > .selected");
|
||||
this.$el.find(".s_ss_prev").toggleClass("inactive", $active.is(":first-child"));
|
||||
this.$el.find(".s_ss_next").toggleClass("inactive", $active.is(":last-child"));
|
||||
},
|
||||
});
|
||||
getCurrentIndex: function () {
|
||||
return this.$el.find(".s_ss_slider > .selected").index();
|
||||
},
|
||||
|
||||
changeSlide: function (n) {
|
||||
var $slides = this.$el.find(".s_ss_slider > li").removeClass("selected");
|
||||
this.$el.find(".s_ss_slider_pagination > li").removeClass("selected");
|
||||
|
||||
var $slide = $slides.eq(n).addClass("selected");
|
||||
$slides.removeClass("move-left");
|
||||
$slide.prevAll().addClass("move-left");
|
||||
|
||||
this.$pagination.children().eq(n).addClass("selected");
|
||||
this.updateNavigation();
|
||||
},
|
||||
|
||||
updateNavigation: function () {
|
||||
var $active = this.$el.find(".s_ss_slider > .selected");
|
||||
this.$el.find(".s_ss_prev").toggleClass("inactive", $active.is(":first-child"));
|
||||
this.$el.find(".s_ss_next").toggleClass("inactive", $active.is(":last-child"));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
odoo.define("theme_enark.tour.enark", function (require) {
|
||||
"use strict";
|
||||
/** @odoo-module **/
|
||||
|
||||
const wTourUtils = require("website.tour_utils");
|
||||
import wTourUtils from "website.tour_utils";
|
||||
|
||||
const snippets = [
|
||||
{
|
||||
@@ -41,4 +40,3 @@ wTourUtils.registerThemeHomepageTour("enark_tour", [
|
||||
wTourUtils.dragNDrop(snippets[4]),
|
||||
wTourUtils.dragNDrop(snippets[5]),
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
odoo.define("theme_graphene.tour.graphene", function (require) {
|
||||
"use strict";
|
||||
/** @odoo-module **/
|
||||
|
||||
const wTourUtils = require("website.tour_utils");
|
||||
import wTourUtils from "website.tour_utils";
|
||||
|
||||
const snippets = [
|
||||
{
|
||||
@@ -43,4 +42,3 @@ wTourUtils.registerThemeHomepageTour("graphene_tour", [
|
||||
wTourUtils.changeBackgroundColor('left'),
|
||||
wTourUtils.selectColorPalette(),
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
odoo.define("theme_real_estate.tour.real_estate", function (require) {
|
||||
"use strict";
|
||||
/** @odoo-module **/
|
||||
|
||||
const wTourUtils = require("website.tour_utils");
|
||||
import wTourUtils from "website.tour_utils";
|
||||
|
||||
const snippets = [
|
||||
{
|
||||
@@ -65,4 +64,3 @@ wTourUtils.registerThemeHomepageTour("real_estate_tour", [
|
||||
wTourUtils.dragNDrop(snippets[8]),
|
||||
wTourUtils.dragNDrop(snippets[9]),
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
odoo.define("theme_vehicle.tour.vehicle", function (require) {
|
||||
"use strict";
|
||||
/** @odoo-module **/
|
||||
|
||||
const wTourUtils = require("website.tour_utils");
|
||||
import wTourUtils from "website.tour_utils";
|
||||
|
||||
const snippets = [
|
||||
{
|
||||
@@ -44,4 +43,3 @@ wTourUtils.registerThemeHomepageTour("vehicle_tour", [
|
||||
wTourUtils.changeBackgroundColor(),
|
||||
wTourUtils.selectColorPalette(),
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user