-
Notifications
You must be signed in to change notification settings - Fork 113
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
[IMP] mysterious_egg #3474
base: master-mysterious-egg
Are you sure you want to change the base?
[IMP] mysterious_egg #3474
Conversation
This PR targets the un-managed branch odoo-dev/odoo:mysterious-egg, it needs to be retargeted before it can be merged. |
da007fc
to
e81a630
Compare
6510625
to
c4b4364
Compare
@@ -24,7 +26,13 @@ export class SetupEditorPlugin extends Plugin { | |||
.filter((el) => !el.hasAttribute("data-oe-sanitize-prevent-edition")); | |||
editableEls.concat(Array.from(this.editable.querySelectorAll(".o_editable"))); | |||
editableEls.forEach((el) => el.classList.add("o_editable")); | |||
this.beforeUnloadFc = this.addDomListener(window, "beforeunload", (event) => { | |||
if (this.isDirty()) { | |||
event.returnValue = _t("This document is not saved!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document ? It s a strange name. Maybe "This website page is not saved!" ? Maybe check with lionel
addons/html_builder/static/src/builder/plugins/setup_editor_plugin.js
Outdated
Show resolved
Hide resolved
this.initialUrl = `/website/force/${encodeURIComponent(this.backendWebsiteId)}`; | ||
this.websiteService.currentWebsiteId = this.backendWebsiteId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for another pr, websiteService life cycle ? Only when the editor is open ?
this.getResource("handleNewRecords").forEach((cb) => cb(filteredRecords)); | ||
// TODO modify `handleMutations` of web_studio to handle | ||
// `undoOperation` | ||
this.getResource("handleNewRecords").forEach((cb) => cb(filteredRecords, this.undoOperation)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use the current step state ? I m not a big fan to put flag in this
@@ -586,6 +589,7 @@ export class HistoryPlugin extends Plugin { | |||
this.addStep({ stepState: "undo" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stepState
@@ -29,18 +29,21 @@ class WebsiteBuilder extends Component { | |||
}); | |||
this.state = useState({ isEditing: false }); | |||
this.websiteService = useService("website"); | |||
this.websiteService.useMysterious = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment //TODO to remove
|
||
test("double click on Image", async () => { | ||
await setupWebsiteBuilder(`<div><img class=a_nice_img src='${base64Img}'></div>`); | ||
await openSnippetsMenu(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if you don t have .modal-content before. You don t have a specific class on your dialog ?
You have an issue in your test, if dblclick open another dialog for strange reason you don t know
aeacbc1
to
395880e
Compare
12e0add
to
6af8375
Compare
6af8375
to
e3c7fe5
Compare
Begin of the save mechanism + tests