[REF] *: Replace core._t imports
In this commit, _t import from import { _t } from
"@web/legacy/js/services/core" and from
web/static/src/legacy/js/core/translation.js are replaced by
@web/core/l10n/translation.js.
task-3292454
closes odoo/odoo#130865
Related: odoo/enterprise#45270
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
registry.category("web_tour.tours").add('account_tour', {
|
||||
url: "/web",
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
registry.category("web_tour.tours").add('account_render_report', {
|
||||
test: true,
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import Widget from "@web/legacy/js/core/widget";
|
||||
import { computeScore } from "@auth_password_policy/password_policy";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { translationIsReady } from "@web/core/l10n/translation";
|
||||
import { translationIsReady, _t } from "@web/core/l10n/translation";
|
||||
|
||||
export default Widget.extend({
|
||||
tagName: "meter",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import {handleCheckIdentity} from "@portal/js/portal_security";
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import "@crm/js/tours/crm";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
var _t = core._t;
|
||||
|
||||
patch(registry.category("web_tour.tours").get("crm_tour"), {
|
||||
steps() {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
import EventAdditionalTourSteps from "@event/js/tours/event_steps";
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import Class from "@web/legacy/js/core/class";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { session } from "@web/session";
|
||||
import { loadJS } from "@web/core/assets";
|
||||
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export const ReCaptcha = Class.extend({
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
const { markup } = owl;
|
||||
|
||||
registry.category("web_tour.tours").add('hr_recruitment_tour',{
|
||||
url: "/web",
|
||||
rainbowManMessage: markup(_t("<div>Great job! You hired a new colleague!</div><div>Try the Website app to publish job offers online.</div>")),
|
||||
rainbowManMessage: () => markup(_t("<div>Great job! You hired a new colleague!</div><div>Try the Website app to publish job offers online.</div>")),
|
||||
fadeout: 'very_slow',
|
||||
sequence: 230,
|
||||
steps: () => [stepUtils.showAppsMenuItem(), {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add('order_lunch_tour', {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* @odoo-module */
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
publicWidget.registry.MailGroup = publicWidget.Widget.extend({
|
||||
selector: '.o_mail_group',
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import session from "web.session";
|
||||
import ajax from "@web/legacy/js/core/ajax";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { sprintf, escape } from "@web/core/utils/strings";
|
||||
import { whenReady } from "@odoo/owl";
|
||||
|
||||
var _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import session from "web.session";
|
||||
|
||||
whenReady(() => {
|
||||
var email = $("input[name='email']").val();
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
const { DateTime } = luxon;
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
|
||||
import paymentFormMixin from "@payment/js/payment_form_mixin";
|
||||
import { debounce } from "@web/core/utils/timing";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
publicWidget.registry.PaymentManageForm = publicWidget.Widget.extend(paymentFormMixin, {
|
||||
selector: 'form[name="o_payment_manage"]',
|
||||
events: Object.assign({}, publicWidget.Widget.prototype.events, {
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
import { escape, sprintf } from "@web/core/utils/strings";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
|
||||
var _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
$.blockUI.defaults.css.border = '0';
|
||||
$.blockUI.defaults.css["background-color"] = '';
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/** @odoo-module **/
|
||||
/* global AdyenCheckout */
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import checkoutForm from "@payment/js/checkout_form";
|
||||
import manageForm from "@payment/js/manage_form";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
const adyenMixin = {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
/** @odoo-module **/
|
||||
/* global Accept */
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { loadJS } from "@web/core/assets";
|
||||
|
||||
import checkoutForm from "@payment/js/checkout_form";
|
||||
import manageForm from "@payment/js/manage_form";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
const authorizeMixin = {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module */
|
||||
/* global Stripe */
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { StripeOptions } from '@payment_stripe/js/stripe_options';
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
export default {
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@ import { _t } from "@web/core/l10n/translation";
|
||||
import { markup } from "@odoo/owl";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
registry.category("web_tour.tours").add("point_of_sale_tour", {
|
||||
url: "/web",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { escape, sprintf } from "@web/core/utils/strings";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import ajax from "@web/legacy/js/core/ajax";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var qweb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
/**
|
||||
* Widget PortalComposer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import session from "web.session";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
@@ -8,8 +8,6 @@ import { deserializeDateTime } from "@web/core/l10n/dates";
|
||||
|
||||
const { DateTime } = luxon;
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var PortalSidebar = publicWidget.Widget.extend({
|
||||
/**
|
||||
* @override
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import { NameAndSignature } from "@web/legacy/js/widgets/name_and_signature";
|
||||
var qweb = core.qweb;
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
/**
|
||||
* This widget is a signature request form. It uses
|
||||
* @see NameAndSignature for the input fields, adds a submit
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import PortalChatter from "@portal/js/portal_chatter";
|
||||
import { roundPrecision } from "@web/core/utils/numbers";
|
||||
|
||||
var _t = core._t;
|
||||
var qweb = core.qweb;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import portalComposer from "@portal/js/portal_composer";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var PortalComposer = portalComposer.PortalComposer;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
registry.category("web_tour.tours").add('project_tour', {
|
||||
sequence: 110,
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
var _t = core._t;
|
||||
import PurchaseAdditionalTourSteps from "@purchase/js/tours/purchase_steps";
|
||||
|
||||
registry.category("web_tour.tours").add('purchase_tour' , {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
var _t = core._t;
|
||||
import PurchaseAdditionalTourSteps from "@purchase/js/tours/purchase_steps";
|
||||
|
||||
PurchaseAdditionalTourSteps.include({
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
const { markup } = owl;
|
||||
|
||||
@@ -83,7 +82,7 @@ registry.category("web_tour.tours").add("sale_tour", {
|
||||
registry.category("web_tour.tours").add("sale_quote_tour", {
|
||||
url: "/web#action=sale.action_quotations_with_onboarding&view_type=form",
|
||||
rainbowMan: true,
|
||||
rainbowManMessage: markup(_t("<b>Congratulations</b>, your first quotation is sent!<br>Check your email to validate the quote.")),
|
||||
rainbowManMessage: () => markup(_t("<b>Congratulations</b>, your first quotation is sent!<br>Check your email to validate the quote.")),
|
||||
sequence: 30,
|
||||
steps: () => [{
|
||||
trigger: ".o_field_res_partner_many2one[name='partner_id']",
|
||||
|
||||
@@ -4,7 +4,7 @@ import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import { formatDateTime, parseDate, parseDateTime} from "@web/legacy/js/core/dates";
|
||||
import time from "@web/legacy/js/core/time";
|
||||
import config from "@web/legacy/js/services/config";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import dom from "@web/legacy/js/core/dom";
|
||||
import {getCookie, setCookie, deleteCookie} from "@web/legacy/js/core/cookie_utils";
|
||||
@@ -12,7 +12,6 @@ import {getCookie, setCookie, deleteCookie} from "@web/legacy/js/core/cookie_uti
|
||||
import SurveyPreloadImageMixin from "@survey/js/survey_preload_image_mixin";
|
||||
import { SurveyImageZoomer } from "@survey/js/survey_image_zoomer";
|
||||
|
||||
var _t = core._t;
|
||||
var isMac = navigator.platform.toUpperCase().includes('MAC');
|
||||
|
||||
publicWidget.registry.SurveyFormWidget = publicWidget.Widget.extend(SurveyPreloadImageMixin, {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { loadJS } from "@web/core/assets";
|
||||
import { SurveyImageZoomer } from "@survey/js/survey_image_zoomer";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_service/tour_utils";
|
||||
|
||||
@@ -152,7 +152,6 @@ This module provides the core of the Odoo Web Client.
|
||||
'web/static/src/legacy/js/common_env.js',
|
||||
'web/static/src/legacy/js/widgets/name_and_signature.js',
|
||||
'web/static/src/legacy/xml/name_and_signature.xml',
|
||||
'web/static/src/legacy/translations_loaded.js',
|
||||
],
|
||||
'web.assets_emoji': [
|
||||
'web/static/src/core/emoji_picker/emoji_data.js'
|
||||
@@ -374,7 +373,6 @@ This module provides the core of the Odoo Web Client.
|
||||
'web/static/src/legacy/legacy_promise_error_handler.js',
|
||||
'web/static/src/legacy/legacy_rpc_error_handler.js',
|
||||
|
||||
'web/static/src/legacy/translations_loaded.js',
|
||||
],
|
||||
'web.assets_frontend_lazy': [
|
||||
('include', 'web.assets_frontend'),
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* @property {boolean} multiLang
|
||||
* @property {string} thousandsSep
|
||||
* @property {number} weekStart
|
||||
* @property {string} code
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -41,4 +42,5 @@ export const localization = {
|
||||
multiLang: notReadyError,
|
||||
thousandsSep: notReadyError,
|
||||
weekStart: notReadyError,
|
||||
code: notReadyError,
|
||||
};
|
||||
|
||||
@@ -87,6 +87,7 @@ export const localizationService = {
|
||||
multiLang,
|
||||
thousandsSep: userLocalization.thousands_sep,
|
||||
weekStart: userLocalization.week_start,
|
||||
code:language,
|
||||
});
|
||||
return localization;
|
||||
},
|
||||
|
||||
@@ -7,8 +7,7 @@ import time from "@web/legacy/js/core/time";
|
||||
import download from "@web/legacy/js/libs/download";
|
||||
import contentdisposition from "@web/legacy/js/libs/content-disposition";
|
||||
import { session } from "@web/session";
|
||||
|
||||
var _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
// Create the final object containing all the functions first to allow monkey
|
||||
// patching them correctly if ever needed.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import dom from "@web/legacy/js/core/dom";
|
||||
import Widget from "@web/legacy/js/core/widget";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
/**
|
||||
* A useful class to handle dialogs.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { uniqueId } from "@web/core/utils/functions";
|
||||
import concurrency from "@web/legacy/js/core/concurrency";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
var _t = core._t;
|
||||
import { localization } from "@web/core/l10n/localization";
|
||||
|
||||
/**
|
||||
* Private function to notify that something has been attached in the DOM
|
||||
@@ -113,7 +113,7 @@ var dom = {
|
||||
class: $textarea[0].className,
|
||||
});
|
||||
|
||||
var direction = _t.database.parameters.direction === 'rtl' ? 'right' : 'left';
|
||||
var direction = localization.direction === 'rtl' ? 'right' : 'left';
|
||||
$fixedTextarea.css({
|
||||
position: 'absolute',
|
||||
opacity: 0,
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import ajax from "@web/legacy/js/core/ajax";
|
||||
import Widget from "@web/legacy/js/core/widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var messages_by_seconds = function() {
|
||||
return [
|
||||
[0, _t("Loading...")],
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
import { uniqueId } from "@web/core/utils/functions";
|
||||
import { range } from "@web/core/utils/numbers";
|
||||
import translation from "@web/legacy/js/core/translation";
|
||||
|
||||
var _t = translation._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
/**
|
||||
* @param {boolean} debug
|
||||
@@ -24,7 +22,7 @@ function QWeb(debug, default_dict, enableTranslation) {
|
||||
'uniqueId': uniqueId,
|
||||
'range' : range,
|
||||
'JSON': JSON,
|
||||
'_t' : translation._t,
|
||||
'_t' : _t,
|
||||
'__debug__': debug,
|
||||
'moment': function(date) { return new moment(date); },
|
||||
'csrf_token': odoo.csrf_token,
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { formatDate, formatDateTime, parseDate, parseDateTime } from "@web/legacy/js/core/dates";
|
||||
import time from "@web/legacy/js/core/time";
|
||||
import Widget from "@web/legacy/js/core/widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var DateWidget = Widget.extend({
|
||||
template: "web.datepicker",
|
||||
type_of_date: "date",
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/** @odoo-module */
|
||||
|
||||
// this module is imported through its alias to ensure translations are loaded
|
||||
// before a module definition is executed, this will be insured by the odoo
|
||||
// module system and is required for defining tours with translated content.
|
||||
|
||||
import { is_bound } from "web.session";
|
||||
export default is_bound;
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { localization } from "@web/core/l10n/localization";
|
||||
import time from "@web/legacy/js/core/time";
|
||||
|
||||
QUnit.module('core', {}, function () {
|
||||
@@ -147,16 +147,16 @@ QUnit.module('core', {}, function () {
|
||||
|
||||
QUnit.test("Get lang datetime format", (assert) => {
|
||||
assert.expect(4);
|
||||
const originalParameters = Object.assign({}, core._t.database.parameters);
|
||||
Object.assign(core._t.database.parameters, {
|
||||
date_format: '%m/%d/%Y',
|
||||
time_format: '%H:%M:%S',
|
||||
const originalParameters = Object.assign({}, localization);
|
||||
Object.assign(localization, {
|
||||
dateFormat: '%m/%d/%Y',
|
||||
timeFormat: '%H:%M:%S',
|
||||
});
|
||||
assert.strictEqual(time.getLangDateFormat(), "MM/DD/YYYY");
|
||||
assert.strictEqual(time.getLangDateFormatWoZero(), "M/D/YYYY");
|
||||
assert.strictEqual(time.getLangTimeFormat(), "HH:mm:ss");
|
||||
assert.strictEqual(time.getLangTimeFormatWoZero(), "H:m:s");
|
||||
Object.assign(core._t.database.parameters, originalParameters);
|
||||
Object.assign(localization, originalParameters);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import config from "@web/legacy/js/services/config";
|
||||
import concurrency from "@web/legacy/js/core/concurrency";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import dom from "@web/legacy/js/core/dom";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import Widget from "@web/legacy/js/core/widget";
|
||||
@@ -12,8 +12,6 @@ import { debounce } from "@web/core/utils/timing";
|
||||
import { sortBy } from "@web/core/utils/arrays";
|
||||
import { pick } from "@web/core/utils/objects";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
/**
|
||||
* Formats a content-check result (@see checkXML, checkSCSS).
|
||||
*
|
||||
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
xml,
|
||||
} from "@odoo/owl";
|
||||
import { LinkTools } from '@web_editor/js/wysiwyg/widgets/link_tools';
|
||||
|
||||
var _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
let cacheSnippetTemplate = {};
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import {SIZES, MEDIAS_BREAKPOINTS} from "@web/core/ui/ui_service";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { uniqueId } from "@web/core/utils/functions";
|
||||
import { pick } from "@web/core/utils/objects";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import {
|
||||
isCSSColor,
|
||||
convertCSSColorToRgba,
|
||||
@@ -45,7 +46,6 @@ import {
|
||||
} from '@web/core/utils/colors';
|
||||
|
||||
var qweb = core.qweb;
|
||||
var _t = core._t;
|
||||
const preserveCursor = OdooEditorLib.preserveCursor;
|
||||
const descendants = OdooEditorLib.descendants;
|
||||
const { DateTime } = luxon;
|
||||
|
||||
@@ -59,7 +59,6 @@ export const tourService = {
|
||||
dependencies: ["orm", "effect", "ui", "localization"],
|
||||
start: async (_env, { orm, effect, ui }) => {
|
||||
await whenReady();
|
||||
await odoo.ready("@web/legacy/translations_loaded");
|
||||
|
||||
/** @type {{ [k: string]: Tour }} */
|
||||
const tours = {};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { loadJS } from "@web/core/assets";
|
||||
import { _t } from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from '@web/legacy/js/core/utils';
|
||||
import session from 'web.session';
|
||||
import publicRootData from '@web/legacy/js/public/public_root';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @odoo-modules **/
|
||||
|
||||
import {qweb, _t} from "@web/legacy/js/services/core";
|
||||
import { qweb } from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import weSnippetEditor from "@web_editor/js/editor/snippets.editor";
|
||||
import wSnippetOptions from "@website/js/editor/snippets.options";
|
||||
|
||||
@@ -11,6 +11,7 @@ import wUtils from "@website/js/utils";
|
||||
import {isImageSupportedForStyle} from "@web_editor/js/editor/image_processing";
|
||||
import "@website/snippets/s_popup/options";
|
||||
import { range } from "@web/core/utils/numbers";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import {Domain} from "@web/core/domain";
|
||||
import {
|
||||
isCSSColor,
|
||||
@@ -20,7 +21,6 @@ import {
|
||||
convertHslToRgb,
|
||||
} from '@web/core/utils/colors';
|
||||
|
||||
var _t = core._t;
|
||||
var qweb = core.qweb;
|
||||
|
||||
const InputUserValueWidget = options.userValueWidgetsRegistry['we-input'];
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
wTourUtils.registerThemeHomepageTour('configurator_tour', () => {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
import weUtils from "@web_editor/js/common/utils";
|
||||
import { isCSSColor } from '@web/core/utils/colors';
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
options.registry.InnerChart = options.Class.extend({
|
||||
custom_events: Object.assign({}, options.Class.prototype.custom_events, {
|
||||
'get_custom_colors': '_onGetCustomColors',
|
||||
|
||||
@@ -4,9 +4,9 @@ import core from "@web/legacy/js/services/core";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import weUtils from "@web_editor/js/common/utils";
|
||||
import { isCSSColor } from '@web/core/utils/colors';
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
const qweb = core.qweb;
|
||||
const _t = core._t;
|
||||
|
||||
const CountdownWidget = publicWidget.Widget.extend({
|
||||
selector: '.s_countdown',
|
||||
|
||||
@@ -4,8 +4,7 @@ import Dialog from '@web/legacy/js/core/dialog';
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import options from '@web_editor/js/editor/snippets.options';
|
||||
import { loadBundle } from "@web/core/assets";
|
||||
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
options.registry.EmbedCode = options.Class.extend({
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
|
||||
options.registry.GoogleMap = options.Class.extend({
|
||||
|
||||
@@ -5,8 +5,8 @@ import { ComponentWrapper } from "@web/legacy/js/owl_compatibility";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
import wUtils from '@website/js/utils';
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
var _t = core._t;
|
||||
var qweb = core.qweb;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from '@web_editor/js/editor/snippets.options';
|
||||
import {generateGMapIframe, generateGMapLink} from '@website/js/utils';
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
options.registry.ProductCatalog = options.Class.extend({
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import utils from "@web/legacy/js/core/utils";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
options.registry.progress = options.Class.extend({
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import fonts from '@web_editor/js/wysiwyg/fonts';
|
||||
import weUtils from '@web_editor/js/common/utils';
|
||||
import options from '@web_editor/js/editor/snippets.options';
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
let dbSocialValues;
|
||||
let dbSocialValuesProm;
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
import concurrency from "@web/legacy/js/core/concurrency";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { debounce } from "@web/core/utils/timing";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
var _t = core._t;
|
||||
var qweb = core.qweb;
|
||||
|
||||
publicWidget.registry.EditModeWebsiteForm = publicWidget.Widget.extend({
|
||||
|
||||
@@ -9,9 +9,9 @@ import weUtils from "@web_editor/js/common/utils";
|
||||
import "@website/js/editor/snippets.options";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { unique } from "@web/core/utils/arrays";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
const qweb = core.qweb;
|
||||
const _t = core._t;
|
||||
let currentActionName;
|
||||
|
||||
const allFormsInfo = new Map();
|
||||
|
||||
@@ -2,32 +2,34 @@
|
||||
|
||||
import wTourUtils from '@website/js/tours/tour_utils';
|
||||
|
||||
const countdownSnippet = {
|
||||
name: 'Countdown',
|
||||
id: 's_countdown',
|
||||
};
|
||||
const dragNDropOutOfFooter = wTourUtils.dragNDrop(countdownSnippet);
|
||||
dragNDropOutOfFooter.run = 'drag_and_drop iframe #wrapwrap #wrap';
|
||||
|
||||
wTourUtils.registerWebsitePreviewTour('website_start_cloned_snippet', {
|
||||
edition: true,
|
||||
test: true,
|
||||
url: '/',
|
||||
}, () => [
|
||||
dragNDropOutOfFooter,
|
||||
wTourUtils.clickOnSnippet(countdownSnippet),
|
||||
{
|
||||
content: 'Click on clone snippet',
|
||||
trigger: '.oe_snippet_clone',
|
||||
},
|
||||
{
|
||||
content: 'Check that the cloned snippet has a canvas and that something has been drawn inside of it',
|
||||
trigger: 'iframe .s_countdown:eq(1) canvas',
|
||||
run: function () {
|
||||
// Check that at least one bit has been drawn in the canvas
|
||||
if (!this.$anchor[0].getContext('2d').getImageData(0, 0, 1000, 1000).data.includes(1)) {
|
||||
console.error('The cloned snippet should have been started');
|
||||
}
|
||||
}, () => {
|
||||
const countdownSnippet = {
|
||||
name: 'Countdown',
|
||||
id: 's_countdown',
|
||||
};
|
||||
const dragNDropOutOfFooter = wTourUtils.dragNDrop(countdownSnippet);
|
||||
dragNDropOutOfFooter.run = 'drag_and_drop iframe #wrapwrap #wrap';
|
||||
return [
|
||||
dragNDropOutOfFooter,
|
||||
wTourUtils.clickOnSnippet(countdownSnippet),
|
||||
{
|
||||
content: 'Click on clone snippet',
|
||||
trigger: '.oe_snippet_clone',
|
||||
},
|
||||
},
|
||||
]);
|
||||
{
|
||||
content: 'Check that the cloned snippet has a canvas and that something has been drawn inside of it',
|
||||
trigger: 'iframe .s_countdown:eq(1) canvas',
|
||||
run: function () {
|
||||
// Check that at least one bit has been drawn in the canvas
|
||||
if (!this.$anchor[0].getContext('2d').getImageData(0, 0, 1000, 1000).data.includes(1)) {
|
||||
console.error('The cloned snippet should have been started');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
import "@website/js/editor/snippets.options";
|
||||
import { uniqueId } from "@web/core/utils/functions";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import dom from "@web/legacy/js/core/dom";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
@@ -74,7 +74,7 @@ publicWidget.registry.websiteBlog = publicWidget.Widget.extend({
|
||||
var blogPostTitle = $('#o_wblog_post_name').html() || '';
|
||||
var articleURL = window.location.href;
|
||||
if ($element.hasClass('o_twitter')) {
|
||||
var twitterText = core._t("Amazing blog article: %s! Check it live: %s");
|
||||
var twitterText = _t("Amazing blog article: %s! Check it live: %s");
|
||||
var tweetText = sprintf(twitterText, blogPostTitle, articleURL);
|
||||
url = 'https://twitter.com/intent/tweet?tw_p=tweetbutton&text=' + encodeURIComponent(tweetText);
|
||||
} else if ($element.hasClass('o_facebook')) {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import FormEditorRegistry from "@website/js/form_editor_registry";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
FormEditorRegistry.add('create_lead', {
|
||||
formFields: [{
|
||||
type: 'char',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import time from "@web/legacy/js/core/time";
|
||||
import { parseDate, formatDate } from "@web/core/l10n/dates";
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
let _t = core._t;
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
publicWidget.registry.RegisterToasterWidget = publicWidget.Widget.extend({
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import "@web/legacy/translations_loaded";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
|
||||
import EventAdditionalTourSteps from "@event/js/tours/event_steps";
|
||||
|
||||
EventAdditionalTourSteps.include({
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import ajax from "@web/legacy/js/core/ajax";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
// Catch registration form event, because of JS for attendee details
|
||||
var EventRegistrationForm = publicWidget.Widget.extend({
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
|
||||
wTourUtils.registerWebsitePreviewTour("website_event_tour", {
|
||||
test: true,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.boothRegistration = publicWidget.Widget.extend({
|
||||
selector: '.o_wbooth_registration',
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
const _t = core._t;
|
||||
|
||||
publicWidget.registry.websiteEventMeetingRoom = publicWidget.Widget.extend({
|
||||
selector: '.o_wevent_meeting_room_card',
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { debounce } from "@web/core/utils/timing";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
var _t = core._t;
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
publicWidget.registry.websiteEventTrackReminder = publicWidget.Widget.extend({
|
||||
selector: '.o_wetrack_js_reminder',
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.websiteEventTrackProposalForm = publicWidget.Widget.extend({
|
||||
selector: '.o_website_event_track_proposal_form',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.websiteEventTrackProposalFormTags = publicWidget.Widget.extend({
|
||||
selector: '.o_website_event_track_proposal_form_tags',
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import session from "web.session";
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
/**
|
||||
* This widget is responsible of displaying quiz questions and propositions. Submitting the quiz will fetch the
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import FormEditorRegistry from "@website/js/form_editor_registry";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
FormEditorRegistry.add('create_task', {
|
||||
formFields: [{
|
||||
type: 'char',
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
wTourUtils.registerBackendAndFrontendTour("question", {
|
||||
url: '/forum/1',
|
||||
|
||||
@@ -9,10 +9,9 @@ import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import { Markup } from '@web/legacy/js/core/utils';
|
||||
import session from "web.session";
|
||||
import { escape, sprintf } from "@web/core/utils/strings";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
var qweb = core.qweb;
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.websiteForum = publicWidget.Widget.extend({
|
||||
selector: '.website_forum',
|
||||
events: {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import FormEditorRegistry from "@website/js/form_editor_registry";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
FormEditorRegistry.add('apply_job', {
|
||||
formFields: [{
|
||||
type: 'char',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var SelectBox = publicWidget.Widget.extend({
|
||||
events: {
|
||||
'change': '_onChange',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
var BarChart = publicWidget.Widget.extend({
|
||||
jsLibs: [
|
||||
'/web/static/lib/Chart/Chart.js',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.websiteLinksCodeEditor = publicWidget.Widget.extend({
|
||||
selector: '#wrapwrap:has(.o_website_links_edit_code)',
|
||||
events: {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import MailGroup from "@mail_group/js/mail_group";
|
||||
|
||||
MailGroup.include({
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
import wUtils from "@website/js/utils";
|
||||
const _t = core._t;
|
||||
|
||||
options.registry.Group = options.Class.extend({
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import FormEditorRegistry from "@website/js/form_editor_registry";
|
||||
|
||||
const _t = core._t;
|
||||
|
||||
FormEditorRegistry.add('create_mailing_contact', {
|
||||
formFields: [{
|
||||
name: 'name',
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import options from "@web_editor/js/editor/snippets.options";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
const qweb = core.qweb;
|
||||
var _t = core._t;
|
||||
|
||||
|
||||
options.registry.mailing_list_subscribe = options.Class.extend({
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import {ReCaptcha} from "@google_recaptcha/js/recaptcha";
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
publicWidget.registry.subscribe = publicWidget.Widget.extend({
|
||||
selector: ".js_subscribe",
|
||||
disabledInEditableMode: false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { sprintf } from '@web/core/utils/strings';
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import publicWidget from '@web/legacy/js/public/public_widget';
|
||||
|
||||
const CUSTOM_BUTTON_EXTRA_WIDTH = 10;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
const _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
function addToCart({productName, search = true, productHasVariants = false}) {
|
||||
const steps = [];
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import wTourUtils from "@website/js/tours/tour_utils";
|
||||
import "@web/legacy/translations_loaded";
|
||||
|
||||
wTourUtils.registerWebsitePreviewTour("shop", {
|
||||
url: '/shop',
|
||||
|
||||
@@ -6,7 +6,8 @@ import { ComponentWrapper } from "@web/legacy/js/owl_compatibility";
|
||||
import { MediaDialog } from "@web_editor/components/media_dialog/media_dialog";
|
||||
import { MediaDialogWrapper } from "@web_editor/components/media_dialog/media_dialog_wrapper";
|
||||
import { useWowlService } from "@web/legacy/utils";
|
||||
import {qweb, _t} from "@web/legacy/js/services/core";
|
||||
import { qweb } from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Markup } from "@web/legacy/js/core/utils";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import "@website/js/editor/snippets.options";
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
var _t = core._t;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
var timeout;
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import publicWidget from "@web/legacy/js/public/public_widget";
|
||||
|
||||
const _t = core._t;
|
||||
const qweb = core.qweb;
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import concurrency from "@web/legacy/js/core/concurrency";
|
||||
const qweb = core.qweb;
|
||||
|
||||
publicWidget.registry.websiteSaleDelivery = publicWidget.Widget.extend({
|
||||
selector: '.oe_website_sale',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user