Issue: When using the Fullscreen mode of slides for articles we do run
first the website animations before loading the slide, which will make
the content to stay invisible since we will never actually perform the
animation.
Steps to reproduce:
1. Create a new course with an article content.
2. Add any block (text, image).
3. Add an animation to this piece of block.
4. Go to Fullscreen mode.
Solution:
We manually instantiate and attach the WebsiteAnimate widget to
the wpContainer element to ensure animations are properly initialized
and applied after the slide has loaded, after that we get rid of this
instance after every new slide that load so we avoid having multiple
instances.
opw-3757919
closesodoo/odoo#159445
X-original-commit: 593ca1f36a4a9da753d8361840b07e2445f2d99b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
How to reproduce:
- Install "French" for the website
- log out and log in as demo
- Go to the front-end and click on "Courses"
The design of the karma wheel is broken because the translation for
"Get 7.5k< xp to level up!" displayed in the wheel is too large ("Obtenez 7.5k
xp pour passer au niveau supérieur"). While in French the text go outside the
wheel and it appears clearly broken, it is also the case in English as the rank
name is hidden due to the length of the text (for example when gaining one
karma: 7.49k is displayed instead of 7.5k which takes more place).
To avoid modifying the template "profile_next_rank_card" that could break
community overrides, we solve this problem in css by increasing the karma
wheel size and the precentage of width occupied by the text inside the wheel.
We also reduce the vertical margin between the rank name and the descriptive
text and reduce the line height to avoid the text to overlap with the wheel.
And if the text is still too large for some language it will be truncated and
an ellipsis will be used.
Technical note: we do the change in website_profile.scss (and not in
website_slides.scss) because it applies to both karma wheel: the one on course
home page and the one in the profile page.
Task-3617054
X-original-commit: f32eabf55db4db4d46b45032c76bfa17dfce475f
Part-of: odoo/odoo#157655
The `course_publisher_standard` tour was missing slide (channel) tags.
We are replacing values used in the tour so that the tour
runs on the same data whether demo data is installed or not.
See runbot build errors 55762 and 55768.
Task-3744848
closesodoo/odoo#156797
X-original-commit: 7d614147bde737c69bed928c7c19d1ac3e7077c8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
Bug
=====
Click the `preview` button on the course page. It does not apply the proper styles
to the button used for enabled or disabled content previews.
Technical
===========
With commit https://github.com/odoo/odoo/commit/2d386bc437194b78ea5d446d7b0fa4f5444406e2, the `badge-hide` class used for the `preview` button was
replaced and some styles were altered.
After this commit
==================
The `preview` button is functioning properly.
Task-3751285
closesodoo/odoo#156409
X-original-commit: 0dd6eba169b17d02f0b8a2b6fbcd8963db75d292
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Bug
===
When we show a PDF in e-learning, we have some navigation buttons
(next, previous, last, first) with some conditions for them to be
enabled or not (e.g. a documentation can have suggested slides, and
so the next button is visible even if we are on the last page).
Those conditions are broken (sometimes a button is disabled when it
shouldn't and vice versa), this commit aims to fix that issue.
Task-3751253
closesodoo/odoo#156363
X-original-commit: f22ef44fc509e4dc1c75fbde54027bf8104c54e6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
Increase the bold of the sections in back end to better
differentiate them from the content.
Specifications
==============
Adding !important next to the css bold style (value = 700)
applied on the sections to make sure it takes the priority
over the default list view sections "fw-bold" class (value = 500).
Task-3759152
closesodoo/odoo#154990
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*: base_import, gamification, hr_skills, mass_mailing, portal,
portal_rating, survey, web, web_editor, website, website_sale,
website_slides
The goal of this commit is to improve the accessibility of the website
pages. This has been made by implementing and correcting ARIA
(Accessible Rich Internet Applications) roles and attributes. More
precisely:
- An `aria-label` attribute has been added on progressbar elements to
avoid a warning of type `ARIA progressbar elements do not have
accessible names`. It has also been added on iframes to avoid a warning
of type `<frame> or <iframe> elements do not have a title`. Furthermore,
`aria-label` has been incorporated on some anchors to avoid a warning of
type `Links do not have a discernible name`. Finally, it has been added
on elements that have the `dialog` role to avoid a warning of type
`Elements with role="dialog" or role="alertdialog" do not have
accessible names` and on elements that have the `listbox` role to avoid
a warning of type `ARIA input fields do not have accessible names`.
- To avoid a warning of type `Some ARIA parent roles must contain
specific child roles to perform their intended accessibility functions`,
`role="menuitem"` has been added on children of menu elements. As
explained in [the menuitem role documentation], "The `menuitem` role
indicates the element is an option in a set of choices contained by a
`menu` or `menubar`". To avoid this warning, `role="presentation"` has
also been added on elements located between `tablist` and `tab` and
between `menu` and `menuitem`. Indeed, as explained in
[the presentation role documentation]; "The `presentation` role removes
an element's implicit ARIA semantics from being exposed to the
accessibility tree". The goal is to inform the assistive technologies
that the default semantics of the element should be ignored. Finally, to
avoid this same warning, the `option` role has been added on elements to
identify selections a user can make in a `listbox`.
- The `aria-label` of some elements has been adapted in order to avoid a
warning of type `Elements with visible text labels do not have matching
accessible names`.
- The value of `aria-disabled` has been corrected to `true` (instead of
`disabled`) (see [the aria-disabled documentation]).
Still to improve the accessibility of the website pages, an alternative
text (`alt`) attribute has been provided for images.
[the menuitem role documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitem_role
[the presentation role documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/presentation_role
[the aria-disabled documentation]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled#valuesclosesodoo/odoo#140453
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit:
- In the fullscreen player, the content of an article from any course stuck to
the contents sidebar, leading to a lack of visual separation.
After this commit:
- Added padding to the article content in fullscreen view. Creating a clear
distinction between the content and the sidebar.
Task-3748836
closesodoo/odoo#155207
X-original-commit: ebb86b65acc2cf59fd3272f56054c00b161fe9aa
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Shubham Thanki (shut) <shut@odoo.com>
How to reproduce:
1. Open eLearning app
2. Go to any course having document with quiz.
3. Solve the quiz
4. Click multiple time quickly on 'Done' (green tick) button.
5. Multiple quiz are displayed if your connection is slow or you click fast
enough.
The fix ensures that only one quiz is displayed. We do the same change for
video to prevent such problem with them.
Technical note: when clicking on the "green tick" of the quiz, the method
_toggleSlideCompleted is called which cause a _renderSlide. That method clears
the content div (o_wslides_fs_content) and appends a new Quiz widget to that
div. The problem is that the "append" is asynchronous (it call the "willStart"
of Quiz widget that fetch the quiz) so if you click multiple time, the content
div is cleared multiple times and then after each quiz created is ready (after
having fetched the data), they are appended to the content div, resulting in
multiple quiz displayed.
We solve the problem by avoiding concurrent execution of the _renderSlide
method: the body of the method is skipped when the rendering is ongoing (for
example while waiting the quiz from the server). As the method is inserting the
slide at the same place, its behavior was anyway unpredictable because
depending on the response time of each request. By skipping the method body
while already running we make it a bit more predictable, avoid the content
duplication on the page, and we avoid unnecessary call to the server.
Task-3412847
closesodoo/odoo#154069
X-original-commit: 72e035274de3bbf7fcc858008bc00d095163e7f3
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Pierre-Yves Dufays (pydu) <pydu@odoo.com>
Before this commit, users were unable to successfully revert the 'done' status
of slides.
Technical Reason:
In this commit https://github.com/odoo/odoo/commit/f956e83c744bd9c970d3f16ce1cb3cff8bba2f6b, the transition from qweb.render to the
Owl render engine (renderToElement) was done. This caused a problem when trying
to undo the 'done' status of slides. The issue was that using 'true' as a
boolean in Owl turned it into an empty string. This fix solves the problem by
making sure we use '0' or '1' as boolean values in Owl.
After this commit, user can revert slides 'done' status.
Task-3667904
closesodoo/odoo#151006
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
This reverts commit 27a1ccc8 which fixed the container height
when course name was too long. It added a 'visibility: hidden'
style which caused an issue on the course left bar where the
progress bar and completed tag are located next to each other.
Task-3607404
X-original-commit: cac68b35777210c3f96a5bd187b479589716145d
Part-of: odoo/odoo#151736
How to reproduce
=================
1. Go to website slides.
2. Open any course which has quiz content.
3. Solve the quiz or open an already solved quiz.
-> Here we can see that the reset and continue buttons are overlapped.
After this commit
=================
Now there will be a space between the reset and continue buttons.
Task-3635485
closesodoo/odoo#146646
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
How to reproduce it:
- Install website_slides
- Go in the course "Basics of Gardening"
- Do the test "Test you knowledge" in fullscreen mode
- The information displayed about your answer is glued to the information icon
This fix the problem by adding space between the icon and the text.
Technical note: Although the html has not changed, the problem was not present
in previous version because the rendering process was not removing all spaces
which is now the case.
Task-3607117
closesodoo/odoo#144985
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Steps to reproduce
====================
1 Open the course and try to retake the quiz.
2 Traceback while submitting the quiz.
Technical
===========
Due to missing closing square bracket in the attribute selector of jquery.
After this commit
==================
There will be no traceback while submitting the quiz.
Task-3633410
closesodoo/odoo#147611
X-original-commit: eea7da64de4e6b70ea4d6b1fc277b36b278ad329
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
HOW TO REPRODUCE
================
- Don't need to login
- From Odoo front-end, go to Courses > Trees, Wood and Gardens >
Main Trees Categories
- You get the following client error:
Uncaught Promise > datetimeObj.getTime is not a function
HOW TO SOLVE:
============
Unlike standard JS equivalent, luxon datetime objects don't have a
getTime() function. Replace it by valueOf() function.
Also, remove calls to `DateTime.fromJSDate().formatting_fn()` by
luxon equivalent functions.
see bb09cf76e3
task-3632077
closesodoo/odoo#145573
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In v17.0, the test TestUiPublisher.test_course_publisher_elearning_manager of
website_slides fails randomly at the step: "eLearning: check uploaded pdf
presence and perform comparison" with the error: "Cannot read properties of
null (reading 'getAttribute')"
How to reproduce it ?
Locally, TestUiPublisher.test_course_publisher_elearning_manager of
website_slides runs without errors but when executing it in the browser we
get the same error as the runbot systematically:
– Install website_slides
– Go to shell mode and execute the setup of the test
– (Backup DB if you want to run the test multiple time)
– Launch in normal mode and connect with demo user
– Go to URL: /web?debug=assets%2Ctests
– Type “odoo.startTour('course_publisher_standard');” in the console
– An error happens at step “eLearning: check uploaded pdf presence and
perform comparison”: Cannot read properties of null (reading 'getAttribute')
(to avoid to wait too long, you can shorten the test by keeping mostly
“addPdfToSection”)
The problem occurs because the rendering of the iframe o_wslides_iframe_viewer
is not always completed when the check is triggered.
We solve this problem by waiting for the rendering to finish before performing
the test (using "await contains"). For safety, we do the same for another check
as this might cause a similar problem in the future.
Although the test has been introduced in 16.2 (see odoo/odoo#117293) but the
error happens only in 17.0 (tested only in 16.4 the way described above), we
publish only the correction in 17.0 and further to avoid different correction
in various version.
Task-3623736
closesodoo/odoo#144719
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Steps to reproduce:
- Get the eLearning App.
- Go to an existing course or create a new one.
- Add a new content of type article.
- Go to website preview and to edit this slide.
- Write plain text inside the box of content.
- Go to Fullscreen.
The issue is that we are using `.append()` and this expects that we pass
it an html or a jquery object which is not the case when we just type
plain text inside it, so using `.html()` will allow us to render any
content as HTML.
opw-3265113
closesodoo/odoo#144818
X-original-commit: 34b78a6619888ebbc6e67b5c474260453a7ed84b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
Clicking on the 'Join This Course' button without login triggers an error.
Reason:
The 'slide.course.join.popupContent' template contains multiple root nodes.
For correct template rendering text and anchor tags are placed inside div tags.
After this commit:
Correct popup content renders when clicking on the 'Join This Course' button,
without login.
Task-3559181
closesodoo/odoo#143280
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
With this commit 963842381e
ClipboardJS was removed to use the native clipboard api.
But here the innerText was checked instead of the value
so there was nothing to copy in the clipboard.
This commit fix this.
Task-3607299
closesodoo/odoo#143206
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
How to reproduce:
=================
1. Open any course having quiz.
2. Select quiz content.
-> In the quiz template we can see that the html content is not sanitize.
Technical:
==========
I think the issue arises after this commit https://github.com/odoo/odoo/commit/0d7acf60b4cca84a8c700edd97af8c4de6b78010
After this commit:
==================
Now t-esc is deprecated and the HTML text is not sanitize in the template
so instead of t-esc we are using t-out.
Task-3555159
closesodoo/odoo#138873
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The purpose of this commit is to delete the legacy/js/core/time.js file.
We have therefore replaced all calls to time.js with the l10N/date.js utilities.
Part of task 3439226
closesodoo/odoo#138609
Related: odoo/enterprise#48918
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.
To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.
task-3072562
X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
Step to reproduce:
- Install `Elearning` module
- Go to any course and a content as document
- Upload a pdf with more than 1 page
- Go to the website and click on the course then on the content with
the document
- Go to last page and click on next button (should display suggested
slides page)
- Click on previous button
Issue:
Page displayed is not the last one, but the one before.
Cause:
When clicking on the previous button, the current page is still the
last page (just with the suggested slides page on top of it as
overlay), and therefore will decrease it to the page number before
last page (nb last page - 1).
Solution:
When clicking on previous button, if we are on the suggested slides
page (by checking if overlay is not hidden since no attribute is set
on `EmbeddedViewer` to know if we are on that page), hide it.
opw-3482712
closesodoo/odoo#137644
X-original-commit: 422625615b2f6708667fa44d2a9e83ad3e66e5af
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
This commit removes the module sortable from jQueryUI and adds instead a
sortable service to use the sortable code already used by the backend.
The service can be called using `this.call("sortable", ...)` and the
sortable listeners are added when the `enable` function is called.
This function (`enable()`) returns an object that contains the `cleanup`
function (`cleanup()`).
```javascript
// start / setup
const sortable = this.call(
"sortable",
"create",
{
ref: { el: document.querySelector(".list") },
elements: ".items",
handle: ".drag-icon",
},
);
// on attach callback / on mounted
const sortableInstance = sortable.enable();
// on destroy / on willUnmount
sortableInstance.cleanup();
```
Also, it adds some new property to the useSortable:
* clone: the placeholder is a clone of the drag element
* placeholderClasses: classes added to the placeholder element
* applyChangeOnDrop: on drop the change is applied to the DOM
* followingElementClasses: classes added to the element following mouse
task-3439226
closesodoo/odoo#137527
Related: odoo/enterprise#48371
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
*: auth_totp_portal, event, portal_rating, web, web_tour, website_blog,
website_event, website_event_booth, website_event_sale,
website_event_track, website_event_track_quiz, website_payment,
website_sale, website_sale_comparison, website_slides,
website_twitter
This commit allows to have responsive font sizes on all the Odoo
frontend. It is based on the Bootstrap mixin `font-size` which
calculates the font size based on the viewport width.
task-1958098
closesodoo/odoo#129469
Related: odoo/design-themes#673
Related: odoo/enterprise#44578
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, owl was in the linter's accepted global variables.
This allowed direct access to owl global object.
For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`
Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:
`import { xml } from "@odoo/owl";`
task-id 3498859
closesodoo/odoo#137517
Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
With this commit, instead of `Record.insert()` before setting
relation with records, we can immediately pass record data.
For example:
```js
message.author = { id: 3, type: "partner", name: "Admin" };
thread.messages.add({ id: 10, body: "some-text-content" })
```
This is supported on all relational fields that define a target
model.
To make this work while drastically avoiding cyclic dependencies
in code, whenever data have to be inserted in relation, they are
pre-inserted with essential data, and then they are fully inserted
after being registered in the relation.
closesodoo/odoo#136539
Related: odoo/enterprise#47854
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.
closesodoo/odoo#136271
Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
- Select a course from the website, and click 'Add Content'.
From the 'Add Content' window, click 'Video'.
- The description with the title 'On Vimeo' is not up to date with
Vimeo privacy management.
After this commit:
The description is now up to date.
task-3458724
closesodoo/odoo#136083
X-original-commit: 4a1d2a2726ce83edbf28dd478c60a3e6f67d4470
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The Dialog widget is deprecated and will soon be removed, this commit
converts the usage of this dialog for the enroll buttons to use the new
dialog service.
To avoid duplicating the opening logic in the Quiz code, the selector of
the widget that opens the dialog now targets the #wrapwrap and uses
event delegation for the button, avoiding the need to manually spawn the
dialog for buttons added to the DOM after the first load.
closesodoo/odoo#135476
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
im_livechat, mrp, project, sms, snailmail, test_mail,
test_mail_full, web, website_livechat, website_slides
Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.
closesodoo/odoo#134652
Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit rewrite the module loader to simplify it and to improve error handling.
before this commit, you could have silent errors or "lucky" imports (import a module based on the fact that his asset will surely be load and if not, the error would be silent anyway).
e.g.: The tours cannot import modules extern to tours' bundle anymore. Or load module before your libs in assets.
TASK ID: 3266021
closesodoo/odoo#128502
Related: odoo/enterprise#44100
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
*account,web_editor,website,website_sale,website_slides
This commit removes all legacy utils except Markup, which will be
removed in another PR. A lot of those utils were no longer used and
thus have just been removed. Those that were still used either
already existed in the wowl codebase, so usecases have been adapted
to use the new version instead. A few have been re-implemented (or
moved basically) to the wowl codebase (e.g. isEmail and humanSize).
Part of task~3439226
closesodoo/odoo#134620
Related: odoo/enterprise#47044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When we haven't provided a custom action, the tour step runs the default
action. In the final step of the tour, when there is no `run` or
`isCheck` provided, It shows warnings of 'ignoring action (auto) of last
step' as it can lead to a race condition.
This commit resolves the warnings: `ignoring action (auto) of last step`
task-3429500
closesodoo/odoo#129239
Related: odoo/enterprise#46683
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
* = calendar, im_livechat, project_todo, sms, snailmail, test_mail,
website_slides
The choice was made to have "trimmed text" check rather than "contains"
to have more robust tests, at the cost of slightly more effort to write
complete and unique asserts.
There is no direct speed improvement from this one, but it is one step
closer to removing jQuery.
Moreover, it will fix infinite loops in some situations, because jQuery
selectors would write attributes on the body, which would trigger the
mutation observer, which itself will call the selector again.
Part-of: odoo/odoo#133717
This commit removes the legacy session and adapts the modules where it
was used.
task 3439226
closesodoo/odoo#133153
Related: odoo/enterprise#46290
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit removes almost all exports of the module services/core.js
(only the bus is left) and adapts the module that imported it.
task 3439226
Part-of: odoo/odoo#133153
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.
closesodoo/odoo#131278
Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.
Part of task~3443861
Part-of: odoo/odoo#130467
This commit removes the qweb.render method, instead it will use the owl
render engine (renderToString or renderToElement).
Part of task~3443861
Part-of: odoo/odoo#130467