Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Conversions #3872

Closed
wants to merge 151 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
b98c505
[POC] introduce Interaction framework
ged-odoo Dec 17, 2024
745a3fc
[REF] website: rewrite publicwidgets as interactions
ged-odoo Dec 17, 2024
8025095
website_*: adapt code to Interactions
ged-odoo Dec 17, 2024
10411d6
fix parallax
romo-odoo Dec 16, 2024
625fc85
fix fullscreen height
romo-odoo Dec 17, 2024
f675720
improve anchor_slide test
romo-odoo Dec 17, 2024
daa5c3e
throw error with white-listed interactions not in array
robinlej Dec 17, 2024
6704eaf
fix dynamicContent doc with proper syntax
robinlej Dec 17, 2024
24a9377
do not lose "this" when when using qualifiers
bso-odoo Dec 17, 2024
0b96800
forward arguments of throttled functions
bso-odoo Dec 17, 2024
6d5417a
WebsiteForumShare
robinlej Dec 16, 2024
34865ba
fix onWillStart issue in website_sale by converting carousel_product
bso-odoo Dec 16, 2024
f07aeaf
remove console log
romo-odoo Dec 17, 2024
12311bd
WebsiteEventMeetingRoom & WebsiteEventCreateMeetingRoom
romo-odoo Dec 17, 2024
bc1a3ab
WebsiteJitsi ChatRoom
robinlej Dec 17, 2024
1a533a4
fix tests forum share
robinlej Dec 17, 2024
19a434d
wip
ged-odoo Dec 18, 2024
6311306
WebsiteProfile & Co
romo-odoo Dec 18, 2024
07eb8c0
enhance jitsiRoom typing
robinlej Dec 18, 2024
983b218
MailGroup & MailGroupMessage
romo-odoo Dec 18, 2024
f19ab9a
adapt slides Animation patch
bso-odoo Dec 18, 2024
c65c549
TestError
romo-odoo Dec 18, 2024
e4dae6f
EventQuizLeaderboard
romo-odoo Dec 18, 2024
2f66840
fix imports
romo-odoo Dec 18, 2024
f4170cf
misc lint issues raised by runbot
bso-odoo Dec 18, 2024
a9f5f21
make interaction service more robust to invalid selectors
ged-odoo Dec 18, 2024
2413811
selectorHas
robinlej Dec 18, 2024
7b7e287
Fix Parallax behavior (start)
romo-odoo Dec 18, 2024
1a1958a
add selectorHas test
robinlej Dec 18, 2024
8d26938
fix popup tours
robinlej Dec 18, 2024
f9fa7e0
fix trapFocus
robinlej Dec 18, 2024
a3826da
Follow
romo-odoo Dec 18, 2024
20b3bfd
Start/stop public widgets when interactions are started/stopped
bso-odoo Dec 18, 2024
ae1e6ad
fix Follow selector
robinlej Dec 19, 2024
df1a4bd
fix website_forum manifest
bso-odoo Dec 19, 2024
8ead61e
.then(undefined) was ok before conversion
bso-odoo Dec 19, 2024
7bd8ecb
CouponToaster & WebsiteSaleGiftCardCopy
romo-odoo Dec 18, 2024
ccb595e
Fix header :
romo-odoo Dec 19, 2024
dcdc313
s_group
bso-odoo Dec 18, 2024
e5d7f64
add tool to patch dynamic content
bso-odoo Dec 18, 2024
e12ee07
also handle t-component and t-on-
bso-odoo Dec 19, 2024
160c24f
HrRecruitmentForm
romo-odoo Dec 19, 2024
7acca6e
BoothSponsorDetails
romo-odoo Dec 19, 2024
ad19827
website_profile: fix test_save_change_description
bso-odoo Dec 19, 2024
896288a
fix t-att-class MailGroup
robinlej Dec 19, 2024
91911eb
Re-add searchbar classes
romo-odoo Dec 19, 2024
03612d3
fix hr_recruitment_form
romo-odoo Dec 20, 2024
951d97c
fix searchbar result position
romo-odoo Dec 20, 2024
16255d9
use t-att-class
romo-odoo Dec 20, 2024
f9bbadf
do not listen to interaction's event impacts
bso-odoo Dec 19, 2024
a0a3827
test_website: dynamic content syntax fix
bso-odoo Dec 20, 2024
5cf2271
no jQuery in hoot
bso-odoo Dec 20, 2024
eed8021
no snippets menu template in xml
bso-odoo Dec 20, 2024
6c8d315
use correct editableMode option when implicitly starting public widgets
bso-odoo Dec 20, 2024
79edbfd
do not addListener in setup
bso-odoo Dec 20, 2024
3b4b514
WebsitePaymentDonation & DonationSnippet
romo-odoo Dec 20, 2024
836958f
renderToFragment in dynamic snippet
bso-odoo Dec 20, 2024
ab42f1a
WebsiteForumSpam: renderToFragment template with multiple nodes
robinlej Dec 20, 2024
0f7b242
UnsplashBeacon
romo-odoo Dec 19, 2024
7103a26
update tour now that the dropdowns are not closed on scroll
romo-odoo Dec 20, 2024
7f5db59
bind share modal removal to modal
bso-odoo Dec 20, 2024
194131a
no disabled 000.js
bso-odoo Dec 20, 2024
1277216
WebsiteEventExhibitorConnect
romo-odoo Dec 22, 2024
2d1284d
fix test_01_beacon (relied on patching jQuery)
bso-odoo Dec 23, 2024
6f7487f
fixes
romo-odoo Dec 23, 2024
3d2ac48
AddressForm
romo-odoo Dec 19, 2024
16930df
CountdownPatch also in edit
bso-odoo Dec 23, 2024
0fcc8e8
PortalInvoicePagePayment & PortalMyInvoicesPaymentList
romo-odoo Dec 23, 2024
98c9f6d
ProjectRatingImage
romo-odoo Dec 23, 2024
9e84547
LoyaltyCard
romo-odoo Dec 23, 2024
4c73804
SignUpForm
romo-odoo Dec 23, 2024
be34940
PasskeyLogin
romo-odoo Dec 23, 2024
09f79e7
DatetimePicker
romo-odoo Dec 23, 2024
62c4ed4
PurchaseDatetimePicker
romo-odoo Dec 23, 2024
6d4283b
fix some conversions
romo-odoo Dec 24, 2024
1ab1ddd
.withTarget qualifier (making sure it is before throttled/debounced)
bso-odoo Dec 24, 2024
45bf27a
include `minimal_dom` in hoot asset
bso-odoo Dec 24, 2024
8c891c2
fix donation_snippet
romo-odoo Dec 24, 2024
b914f96
fix address_form
romo-odoo Dec 24, 2024
b62cde9
fixed anchor slide test
bso-odoo Dec 24, 2024
8922bda
fix animation: be visible upon adjusting option
bso-odoo Dec 23, 2024
eebd779
clicked element are far far away off screen, and show/shown confusion
bso-odoo Dec 24, 2024
d1742d4
fix mega menu dropdown
romo-odoo Dec 26, 2024
10a80b6
also show popup when `t-on-show` is not triggered
bso-odoo Dec 24, 2024
396d276
Forward args in stealth function
bso-odoo Dec 26, 2024
0dc0e1e
fix dropdown & header hide on scroll tour
romo-odoo Dec 26, 2024
21032cc
totp
romo-odoo Dec 24, 2024
125f1ac
add waitFor on orm.call
romo-odoo Dec 26, 2024
4990678
BoothRegistration
romo-odoo Dec 24, 2024
aa1b095
SaleUpdateLineButton
romo-odoo Dec 23, 2024
2e47a68
interactions must also be started if nested in public widget
bso-odoo Dec 26, 2024
deb76ca
CRMPartnerAssign
romo-odoo Dec 20, 2024
f72d31c
partial revert: no second start
bso-odoo Dec 27, 2024
e000fef
Simplify some functions name
romo-odoo Dec 26, 2024
d71f091
default super function if missing when patching dynamic content
bso-odoo Dec 27, 2024
3c65c19
convert booth_registration patch
romo-odoo Dec 27, 2024
615fba8
typo
bso-odoo Dec 27, 2024
54dc791
fix test_05_certification_failure_tour
bso-odoo Dec 27, 2024
78d04dc
fix manifest
romo-odoo Dec 27, 2024
ab3272b
fix test_autocomplete
bso-odoo Dec 27, 2024
9c41bea
small fix booth registration
romo-odoo Dec 30, 2024
33a7aa4
autostart on insert & renderAt
bso-odoo Dec 27, 2024
107700c
use renderAt and avoid double startInteractions
bso-odoo Dec 30, 2024
c608696
booth registration: result is named data
bso-odoo Dec 30, 2024
da02109
renderAt output and callback parameter as nodes array
bso-odoo Dec 31, 2024
466718b
Small fix
romo-odoo Dec 27, 2024
c81c3a9
carousel (folder)
romo-odoo Dec 27, 2024
05e10e0
cookies (folder)
romo-odoo Dec 27, 2024
6847860
dropdown (folder)
romo-odoo Dec 27, 2024
6367106
header (folder)
romo-odoo Dec 27, 2024
64e552b
popup (folder)
romo-odoo Dec 27, 2024
55a7580
video (folder)
romo-odoo Dec 27, 2024
b447908
last interactions (1/8)
romo-odoo Dec 27, 2024
ac1a32e
last interactions (2/8)
romo-odoo Dec 27, 2024
e290abf
last interactions (3/8)
romo-odoo Dec 28, 2024
0a41120
last interactions (4/8)
romo-odoo Dec 29, 2024
62300cd
last interactions (5/8)
romo-odoo Dec 29, 2024
34472bb
last interactions (6/8)
romo-odoo Dec 29, 2024
b122129
last interactions (7/8)
romo-odoo Dec 29, 2024
2ada665
last interactions (8/8)
romo-odoo Dec 30, 2024
d3e37a7
[FIX] conversion updates
romo-odoo Dec 31, 2024
9bbf731
interactions outside website (1/1)
romo-odoo Dec 31, 2024
5413fba
many fixes
romo-odoo Dec 31, 2024
0e827bb
"fix" website_forum HOOT: adding some advanteTime(100) so make stable
bso-odoo Dec 31, 2024
86229c6
oups
romo-odoo Dec 31, 2024
c22bad8
signin -> logIn
romo-odoo Dec 31, 2024
ab065de
fix zoomed background shape
romo-odoo Dec 31, 2024
af80ef8
actually return elements from renderAt
bso-odoo Dec 31, 2024
f6ea365
"fix" popup tests: added some advanceTime to make more stable
bso-odoo Dec 31, 2024
70c27dc
website_event_track_quiz manifest
bso-odoo Dec 31, 2024
a3febb6
rename interactions in tests too
romo-odoo Dec 31, 2024
52efc75
here we go now
romo-odoo Dec 31, 2024
4860869
website_forum hoot: missed one advanceTime...
bso-odoo Dec 31, 2024
535fcd7
test and fix renderAt (of course condition was inverted)
bso-odoo Dec 31, 2024
72a2ee3
GoogleMap
romo-odoo Dec 26, 2024
6b971ee
Handle old trigger_up gmap_api_request
bso-odoo Dec 31, 2024
27d5401
[...]PortalSidebar + PortalPrepayment
romo-odoo Jan 2, 2025
80babd0
WebsiteSlides (13 converted out of 19)
romo-odoo Dec 31, 2024
7580dc4
Fix issues + Add CoursePrerequisite
romo-odoo Jan 2, 2025
a52c5fd
fix manifests
romo-odoo Jan 2, 2025
7a09961
global fix (pylint)
romo-odoo Jan 2, 2025
a680459
Missing "s" in import statements
bso-odoo Jan 3, 2025
3728cd4
event quiz
bso-odoo Jan 2, 2025
e8b7836
fix imports
bso-odoo Jan 3, 2025
d7a8c17
fix test_01_portal_sale_signature_tour
bso-odoo Jan 3, 2025
119783a
no more 000.js in website
bso-odoo Jan 3, 2025
cf21c23
fix manifest
romo-odoo Jan 3, 2025
9b2df35
fix test_course_certification_employee
bso-odoo Jan 3, 2025
68ce0a1
Recaptcha
romo-odoo Jan 6, 2025
8394522
WebsiteMassMailing
romo-odoo Jan 6, 2025
bbfd44f
InvoiceSendingMethod
romo-odoo Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion addons/account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
('remove', 'account/static/tests/tours/**/*'),
],
'web.assets_frontend': [
'account/static/src/js/account_portal_sidebar.js',
'account/static/src/interactions/**/*',
'account/static/src/js/account_portal.js',
'account/static/src/components/tests_shared_js_python/*',
'account/static/src/helpers/*.js',
Expand Down
58 changes: 58 additions & 0 deletions addons/account/static/src/interactions/account_portal_sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { PortalSidebar } from "@portal/interactions/portal_sidebar";
import { registry } from "@web/core/registry";

import { scrollTo } from "@web/core/utils/scrolling";

export class AccountPortalSidebar extends PortalSidebar {
static selector = ".o_portal_invoice_sidebar";
dynamicContent = {
_window: { "t-on-resize": this.updateIframeSize },
".o_portal_invoice_print": { "t-on-click.prevent.withTarget": this.onClickPrint },
};

setup() {
super.setup();
this.invoiceHTMLEl = this.el.querySelector("iframe#invoice_html");
}

start() {
super.start();
const iframeDoc = this.invoiceHTMLEl.contentDocument || this.invoiceHTMLEl.contentWindow.document;
if (iframeDoc.readyState === 'complete') {
this.updateIframeSize();
} else {
this.addListener(this.invoiceHTMLEl, "load", this.updateIframeSize);
}
}

/**
* Called when the iframe is loaded or the window is resized on customer portal.
* The goal is to expand the iframe height to display the full report without scrollbar.
*/
updateIframeSize() {
const wrapwrapEl = this.invoiceHTMLEl.contentDocument.querySelector("div#wrapwrap");
this.invoiceHTMLEl.style.height = 0;
this.invoiceHTMLEl.style.height = wrapwrapEl.scrollHeight;
// scroll to the right place after iframe resize
const isAnchor = /^#[\w-]+$/.test(window.location.hash)
if (!isAnchor) {
return;
}
const targetEl = document.querySelector(`#${window.location.hash}`);
if (!targetEl.length) {
return;
}
scrollTo(targetEl, { behavior: "instant" });
}

/**
* @param {MouseEvent} ev
*/
onClickPrint(ev, currentTargetEl) {
this.printIframeContent(currentTargetEl.getAttribute("href"));
}
}

registry
.category("public.interactions")
.add("account.account_portal_sidebar", AccountPortalSidebar);
69 changes: 0 additions & 69 deletions addons/account/static/src/js/account_portal_sidebar.js

This file was deleted.

3 changes: 1 addition & 2 deletions addons/account_payment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
'assets': {
'web.assets_frontend': [
'account_payment/static/src/js/payment_form.js',
'account_payment/static/src/js/portal_invoice_page_payment.js',
'account_payment/static/src/js/portal_my_invoices_payment.js',
'account_payment/static/src/interactions/*',
],
},
'post_init_hook': 'post_init_hook',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Interaction } from "@web/public/interaction";
import { registry } from "@web/core/registry";

export class PortalInvoicePagePayment extends Interaction {
static selector = "#portal_pay";

setup() {
if (this.el.dataset.payment) {
(new Modal("#pay_with")).show();
}
}
}

registry
.category("public.interactions")
.add("account_payment.portal_invoice_page_payment", PortalInvoicePagePayment);

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Interaction } from "@web/public/interaction";
import { registry } from "@web/core/registry";

import { deserializeDateTime } from "@web/core/l10n/dates";
import { _t } from "@web/core/l10n/translation";

const { DateTime } = luxon;

export class PortalMyInvoicesPaymentList extends Interaction {
static selector = ".o_portal_my_doc_table";

start() {
const today = DateTime.now().startOf("day");
const dueDateEls = this.el.querySelectorAll(".o_portal_invoice_due_date");
for (const dueDateEl of dueDateEls) {
const dateTime = deserializeDateTime(dueDateEl.getAttribute("datetime")).startOf('day');
const diff = dateTime.diff(today).as("days");

const dueDateLabel =
(diff === 0) ? _t("due today") :
(diff > 0)
? _t("due in %s day(s)", Math.abs(diff).toFixed())
: _t("%s day(s) overdue", Math.abs(diff).toFixed());

// We use `.createTextNode()` to escape possible HTML in translations (XSS)
dueDateEl.replaceChildren(document.createTextNode(dueDateLabel));
}
}
}

registry
.category("public.interactions")
.add("account_payment.portal_my_invoices_payment_list", PortalMyInvoicesPaymentList);

This file was deleted.

35 changes: 0 additions & 35 deletions addons/account_payment/static/src/js/portal_my_invoices_payment.js

This file was deleted.

1 change: 1 addition & 0 deletions addons/account_peppol/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'account_peppol/static/src/components/**/*',
],
'web.assets_frontend': [
'account_peppol/static/src/interactions/**/*',
'account_peppol/static/src/js/*',
],
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Interaction } from "@web/public/interaction";
import { registry } from "@web/core/registry";

export class InvoiceSendingMethod extends Interaction {
static selector = ".o_portal_details select[name='invoice_sending_method']";
dynamicContent = {
_root: { "t-on-change": this.showPeppolConfig },
};

start() {
this.showPeppolConfig();
}

showPeppolConfig() {
const method = this.el.value;
const peppolToggleEls = document.querySelectorAll(".portal_peppol_toggle");
for (const peppolToggleEl of peppolToggleEls) {
peppolToggleEl.classList.toggle("d-none", method !== "peppol");
}
}
}

registry
.category("public.interactions")
.add("account_peppol.invoice_sending_method", InvoiceSendingMethod);
30 changes: 0 additions & 30 deletions addons/account_peppol/static/src/js/portal.js

This file was deleted.

2 changes: 1 addition & 1 deletion addons/auth_passkey/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
'web.assets_frontend': [
'auth_passkey/static/lib/simplewebauthn.js',
'auth_passkey/static/src/login_passkeys.js',
'auth_passkey/static/src/interactions/*',
],
},
'license': 'LGPL-3',
Expand Down
28 changes: 28 additions & 0 deletions addons/auth_passkey/static/src/interactions/passkey_login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Interaction } from "@web/public/interaction";
import { registry } from "@web/core/registry";

import { rpc } from "@web/core/network/rpc";
import { startAuthentication } from "../../lib/simplewebauthn.js";

export class PasskeyLogin extends Interaction {
static selector = ".passkey_login_link";
dynamicContent = {
_root: { "t-on-click": this.onClick },
};

async onClick() {
const serverOptions = await this.waitFor(rpc("/auth/passkey/start-auth"));
const auth = await this.waitFor(startAuthentication(serverOptions).catch(e => console.error(e)));
if (!auth) {
return false;
}
const form = document.querySelector('form.oe_login_form');
form.querySelector('input[name="webauthn_response"]').value = JSON.stringify(auth);
form.querySelector('input[name="type"]').value = 'webauthn';
form.submit();
}
}

registry
.category("public.interactions")
.add("auth_passkey.passkey_login", PasskeyLogin);
18 changes: 0 additions & 18 deletions addons/auth_passkey/static/src/login_passkeys.js

This file was deleted.

Loading