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,7 +1,6 @@
|
||||
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",
|
||||
@@ -119,4 +118,3 @@ odoo.define('theme_common.s_css_slider_frontend', function (require) {
|
||||
$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,8 +1,7 @@
|
||||
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",
|
||||
@@ -129,4 +128,3 @@ odoo.define("theme_common.s_showcase_slider_frontend", function (require) {
|
||||
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