summaryrefslogtreecommitdiff
path: root/addons/website_slides/static/src
AgeCommit message (Collapse)Author
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-21[FIX] website_slides: remove reference to google+ in lesson statistics updateThibault Delavallée
Let us consider this great social network is not necessary anymore. Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: fix various quiz-related issuesqmo-odoo
This commit provides a few fixes for quiz feature: * fix amount of karma won by the user in a quiz; * correctly display the fact that a subquiz was completed by the user instead of just looking like a non-completed quiz; * going on a previously completed quiz, good answers are hightlighted and inputs disabled; * effectively put the quiz in readonly mode if not a channel member. Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides[_survey]: fix various fullscreen issuesqmo-odoo
This commit provides a few fixes for the fullscreen view: * make external links associated with a slide clickable again in fullscreen mode; * hide completion icons if not member: * add margin to subquiz icon in header; * add dedicated button to exit the fullscreen mode; * change "Pass certification" button to "Test Certification" if not member of the channel (for website publishers); Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] websiste_slides: perform small tweaks on elearning homepagesri-odoo
In Top menu, replace 'My courses' with 'Search' and adapt responsivness for small devices. Truncate card's description and perform minors design tweaks. Also add some slides-specific layouting to email validation banner. Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: improve documentation course layout and not fullscreen ↵sri-odoo
lesson page Purpose of this commit is to perform a cleaning of * documentation course: add a new specific navigation for documentation course with a sort option and filters on slide types; clean overall layout of documentation course to have a better-looking result as this page was still not really updated; * lesson not fullscreen page: global layout and cleaning of not-fullscreen page to have a better-looking result. Notably related slides for documentation slide is set on right, and some UX bits are tweakes; Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: improve upload modal overall designsri-odoo
Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: improve quiz and its success modal layout and designsri-odoo
Commit linked to task ID 1941250 and PR #31977
2019-03-21[REF] website_slides: cleanup scss ordering, remove unused classes, add ↵Thibault Delavallée
placeholder images Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: improve course overall layout and training content listsri-odoo
Purpose of this commit is to improve the global look of course layout (notably banner, navigation, course / channel informations). Content list layout displayed in training (orderable) is also tweaked and improved. Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: fix course navigation designsri-odoo
Commit linked to task ID 1941250 and PR #31977
2019-03-21[FIX] website_slides: fix various fullscreen layout issuessri-odoo
Improve overall widget layout, perform some small tweaks. Also remove top title as it is not wanted. Commit linked to task ID 1941250 and PR #31977
2019-03-19[REF-FIX] website_slides : review and fix access, vote, comment and ratingDavid Beguin
Commit 5798ca28bfa1dc082fedff5e68ab3f7eb6236687 was assuming the vote and comment access on slide was related to is_preview mode and was, consequently, depending on each slide separately. In fact, it's not because a slide is in preview mode that the user has the right to vote for this slide. He must be course member to interact with this preview slide, even if he has the right to read it. So the vote and comment right are now computed at the level of the course, and apply to all the slides of this course. This commit also reviews and apply fixes on review - rating access. Here are the applied rules regarding vote, comment and rating on course and slides: A user can review a course: - If allow_comment is activated on the course AND - If the user is publisher OR - If the user has enough karma AND is member of the course. Note : if the rating is not allowed on the course, not only the button to review must be hidden but also the entire rating composer. A user can vote and comment a slide: - If allow_comment is activated on the course AND - If the user is publisher OR - If the user has enough karma AND is member of the course. Other fix applied is this commit : - Avoid crash when no promoted slide : When going on course homepage (documentation type), if no promoted slide, we got a internal server error. Task ID: 1941250 Partial revert of commit 5798ca28bfa1dc082fedff5e68ab3f7eb6236687 PR #31567
2019-03-15[FIX] website_slides: auto set done successfull quizzjem-odoo
For now, in no fullscreen mode, if the quiz is succeed, the user progress is not updated because the quiz is not set to done. This commit implements this call to mark slide as done and green the check bullet. We decided to unify the submit RPC call with the done one, so a quiz (or a slide with questions) can only be done when submitting answers. As consequence, we need to prevent some slide type to use the /set_completed route (quiz and certif). Task-1941250
2019-03-15[IMP] website_slides: embedded player restylingsri-odoo
The style and DOM structure of the embeded player (used to display PDF file) is old, and it needed a little refresh to be adapt to bootstrap4 and modern styling. Task-1941250
2019-03-15[FIX] website_slides: styling fullscreen modesri-odoo
Since the fullscreen widget has been revamped, it needed to be pixel perfect. This commit cleans the CSS and DOM structure in order to optimize and sublime it. Task-1941250
2019-03-15[IMP] website_slides : improve get slide access computationDavid Beguin
As slides are returned in sudo to the template, the user rights were checked via a can_access variable set in the template directly. In order to disable the vote for user that cannot get access to the course all the checks are now done in backend (also to avoid to get access to slides in sudo mode with rpc calls). We add now, for each slide on the course view, the access and vote rights to the template : can_access and can_vote. Those two are computed in backend, using the user's access right instead of admin's. But, as if the user is not member of the channel, he cannot get access to the course slides (expect for Free Peview ones), so the check on can_vote will crash. This is why we check the access rights before checking can_vote, for each slides (as free preview slides are still accessible, even if the user is not in channel members). The vote widget is disabled if user's can_access or can_vote = False, enabled otherwise. If user have access but have not enough karma, the controller will handle this case and return an error to the user telling him he has not enough karma to vote. If user can vote but cannot access, the controller will handle this case and return an error to the user telling him he has no access to the lesson. Task ID: 1943788 PR #31321
2019-03-15[IMP] website_slides : allow review, comment and vote only if enough karmaDavid Beguin
To avoid eLearning to be spammed, the comment, review and vote behaviours are now allowed only if the user has enough karma to do it. Here is the new behaviour on courses and slides rating / comment / vote -If allow_comment is checked on Course : - Review (rating) is allowed on Course only if enough karma - Comment is allowed on slides within the course only if enough karma and course type is 'training' - Vote is allowed on slides within the course only if enough karma and course type is 'documentation' -If allow_comment is not checked on Course : - Review (rating) is not allowed on Course - Comment is not allowed on slides within the course - Vote is not allowed on slides within the course - Rating is not allowed on slides within the course anymore Task ID : 1943788 PR #31321
2019-03-12[FIX] website_slides: no completion for public userqmo-odoo
When a slide is seen by user, it should be marked as completed (according to its type), and the user completion for the course is updated. But for public user, we don't want those RPC calls to be done, as completion for visitor makes no sense. This commit also hide progressbar when current user is public. Task-1942852 closes odoo/odoo#31700 Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-12[REF] website_slides: revamp fullscreen widgetqmo-odoo
This commit makes the 'Fullscreen' page a complete odoo widgets. We decided to split it into some sub widget: - Fullscreen: will be the master piece, handle communication of components, displaying slide content, setting slide as completed, handling server RPC calls, .... - Sidebar: responsible for slide navigation, based on the table of content. (prev, next, keyboard naviguation, ...) - VideoPlayer: display content for Youtube video and handling player event to auto set as completed, ... The DOM of this page is still rendered serverside. DOM was cleaned in order to be less complex and less deep. CSS style was also reviewed to decrease line of code. Fullscreen is now completely using Quiz widget with events triggered. Task-1942852
2019-03-07[REF] website_slides: rework standard lesson page viewThibault Delavallée
Purpose of this commit is to perform a cleaning and upgrade of the lesson view in front-end when not using the fullscreen mode. This page had not been updated since eLearning addition. A method is added on slide model to have a protected method computing quiz related information on a given set of slides, notably potential karma gain, gained karma and number of attempts. It is mainly a code move from controllers now working in batch. Some linting is also done, notably a badly-named file. See original eLearning task for main specifications [1]. Commit linked to task ID 1941250 and PR #31657. [1] See task ID 1902304 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-12[FIX] website_slides: make correct use of frontend widgetAurélien Warnon
Purpose ======= This follows up commit d946b7a85d2c1bbc20ace8e2b269be56a63876fd that cleans wrong uses of sAnimations for non-animated behaviors. closes odoo/odoo#31794 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-06[REF] website_slides: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-07[REF] website_slides: redesign quiz widgetjem-odoo
This commit makes the quiz widget a real odoo widget that triggers up some events. The widget is now only responsible of * fetching quiz data (if not given) * decorating the anwsers according to the result * displaying message (error or modal) To do so, some code move/rewrite was needed * extract and factorize some template * add 'sudo' on technical model to avoid access rights error * factorize some python method from controller to model * remove some CSS classes to lighten the code * fixing access model error * make quiz widget handle the display of error message * give browse record for template rendering, rather than slug * cleaning some spaghetti code in Fullscreen widget * ... Commit linked to task ID 1941250 and PR #31584. Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-07[FIX] website_slides: correctly return deferred when calling slide routes in ↵Thibault Delavallée
fullscreen I promise to fix all deferred. Huk huk huk. Commit linked to task ID 1941250 and PR #31584.
2019-03-04[FIX] website_slides: fix display of lessons in training courseThibault Delavallée
Currently slides are displayed in a reorderable list, using current user access rights. This means external customers see only published and free lessons. However purpose of course page is to display all lessons, and display only available ones as clickable. Other one should be displayed as muted to tease people. Note that a specific lesson page does check for access rights. Here we just display all lessons names. A label for free preview is also added. Fetch of data when displaying a channel is therefore a bit modified as there are less differences between training and documentation channels. User progress is also updated to be easier to use in templates. Commit linked to task ID 1941250 and PR #31453
2019-03-04[IMP] website_slides: slightly improve homepageStefano Rigano
Purpose of this commit is to make a new design linting pass on homepage. Containing * various bs4 and responsive improvements; * footer banner improvements; Commit linked to task ID 1941250 and PR #31453
2019-03-04[REF] website_profile and dependencies: improve global layout and designsri-odoo
Purpose is to perform a cleaning pass on website_profile templates. It cleans the DOM, templates and CSS and proposes various improvements on general design and layouting. This includes notably * lessen custom CSS and use bootstrap 4 classes; * simplify layout when possible; * make is responsive and mobile friendly; No functional changes should occur with this commit. Sub modules are impacted as profile is extended in various other applications: eLearning, forum and certification. Commit linked to task ID 1941250 and PR #31453
2019-03-04[IMP] website_slides(_*): improve demo dataThibault Delavallée
Purpose of this commit is to improve eLearning demo data. Notably links (links to external resources on a given slide) and quizzes (allowing to gain karma) are added. Some slides are added. Demo user interaction with eLearning is also added, such as membership and votes. Finally a channel is specifically kept specific to 1 single slide of type certification as its flow has to bypass some screens when selling pure certifications. Commit linked to task ID 1941250 and PR #31453
2019-02-26[FIX] website_slides: use progressbar from bootstrap to avoid too much codejem-odoo
This commit replaces a widget with standard boostrap code: the progress bar classes. Creating a widget was a little bit over engineered, and since the progress animation is handle in CSS, this replacement does not cause any loss of feature. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[FIX] website_slides: improve tab on main course page and restore reviewjem-odoo
The review tab exists on channel homepage, but does not show the reviews of the channel. This commit makes the tab dynamic for homepage content and reviews. Forum tab still redirects user to the forum page. Layouting of course page is also improved to better match the new homepage layouting. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[FIX] website_slides: improve upload modaljem-odoo
Various fixes : * better label on upload modal; * upload always visible slide. When uploading a slide with the is_preview checkbox checked, it does not work as in the controller we are looking after a string when receiving a python boolean; * switch modal buttons in slide upload modal to have a correct order; * prevent auto scroll up. When clicking on the plus icon in drag'n'droppable list view of a course homepage, if the user has scroll down the page he will be automatically scroll up. This is very annoying and make some of my colleagues grumpy; * hide slide upload if not channel.can_upload. This commit hides the "+" icon next to the channel categories if the user doesn't have the rights to upload slides; Commit linked to task ID 1942852 and PR #31394. Co-Authored-By: David Beguin <dbe@odoo.com> Co-Authored-By: Jerome Maes <jem@odoo.com> Co-Authored-By: Aurélien Warnon <awa@odoo.com>
2019-02-26[REF] website_slides: lint slide like / dislike widgetThibault Delavallée
Just apply some linting and naming convention. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: lint course join widgetThibault Delavallée
Just apply some linting and naming convention. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: handle uncategorized slides in training course viewAurélien Warnon
Purpose ======= This commit adds the management and display of uncategorized slides for both the frontend publishing management and the fullscreen course views. We add a "Uncategorized" section on top of all the categories that is hidden for the student if it's empty. Course publishers can drag and drop slides from and to that new "Uncategorized" section to easily reorganize the course. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: refactor the course reordering of slides and categoriesAurélien Warnon
Purpose ======= This commit refactors the way slides and categories are reordered in the frontend course view (training courses). The use of jqueryui's "sortable" widget makes it easier and more user friendly to drag and drop both sections and slides to reorganize your course. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[FIX] website_slides: fix call to set_completedThibault Delavallée
Currently fullscreen widget calls a user-specific route as public user if user is not logged. Purpose of this commit is to avoid JS crash. Some code cleaning is also done. This small feature will have to be cleaned more in-depth in a near future. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: refactor the category add modal on frontendAurélien Warnon
Purpose ======= This commits refactors the way slide.category are added on frontend: * JS now extends a standard Dialog widget; * added "required" name value on the form and handled validation; * controller adds the category at the bottom of the list (sequence+1); Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: refactor the slide archive modal on frontendAurélien Warnon
Purpose ======= This commits refactors the slide archiving confirmation modal to make it a standard Dialog (remove global selectors, remove most of useless xml, ...). It also adds a new slide archive route to allow channel publishers to archive slides in sudo mode. Indeed ACLs only website_publishers can write on slide model. In some case people without real rights may update slides. Commit linked to task ID 1942852 and PR #31394.
2019-02-26[REF] website_slides: apply linting and cleaning to elearning lesson pages ↵Quentin Mourier
and widgets Purpose of this commit is to perform some linting and cleaning in lesson widget JS and its related css. Notably for fullscreen widget of eLearning. Containing * better naming of css classes; * deleted sidebar file as it is now included directly in the fullscreen widget; * removed unused css; * apply JS linting; * clean some controllers; Commit linked to task ID 1942852 and PR #31394.
2019-02-21[FIX] website_slides: fix vote widgetjem-odoo
Fix route of vote widget. Set it to auth=public so that instead of a crash we have correct popup asking to login. Better than a SessionException, which will not be displayed. Another fix is done to avoid having one widget for all displayed like / dislike buttons. Each slide should have its own vote widget. Commit linked to task ID 1941250 and PR #31317.
2019-02-21[IMP] website_slides: improve main course page in documentation modeThibault Delavallée
Purpose is to clean a bit the card layout in documentation courses, notably * better layout for cards: * fetch (in controller as slides in course display are sudo-ed to display a card even if current user has no access) completion data and display it; Commit linked to task ID 1941250 and PR #31317.
2019-02-21[FIX] website_slides: reload page when joining channeljem-odoo
When a user join a channel, the button 'join' changed and indicates him that he is now member, but since the page is not refreshed, he still can not access to slides displayed on the page. This commit makes the widget trigger a page refresh. Commit linked to task ID 1941250 and PR #31317.
2019-02-21[REF] website_slides: improve design of "all courses" main pagessri-odoo
Containing notably * improve banners; * sidebar achievement design; * some sidebar adjustments; * adapt to circular rank progress the current user sidebar; * improve overall spacing; * improve cards design and size; * improve 'all courses' grid layout; * clean unused css and templates; Commit linked to task ID 1941250 and PR #31317.
2019-02-21[IMP] website_slides: slightly improve demo dataThibault Delavallée
Some addition to demo data, notably some members and a few more slides. I bet there will be other commits improving demo data, one slide at a time. Commit linked to task ID 1941250 and PR #31317.
2019-02-21[FIX] website_slides: add various design and UX fixesDavid Beguin
- slidesChannelDropdownSort : dropdown items back to visible (was white on white) - Featured lesson : change icon to bullhorn instead of + icon - Pass certification fullscreen button : btn primary - set max height to fullscreen content to 100% minus header - Fix 'infographic' slide type image view - change image for 'Furniture Technical Specifications' course - fix fullscreen presentation mode: The condition to add the iframe that contains the presentation of the document was wrong and, so, never met. Those conditions are evaluated in javascript and not in python as it's part of t-name template linked to a javascript widget. Commit linked to task ID 1941250 and PR #31279.
2019-02-21[IMP] website_slides: improve homepage navbar designsri-odoo
Force white background + add the default bootstrap shadow. Do not use <h4> tags to keep the right font-size on mobile. Simplify layout, add a second navabar to handle content supposed to be moved to the right. Commit linked to task ID 1941250 and PR #31279.
2019-02-21[IMP] website_slides: fix and improve homepageThibault Delavallée
Various fixes linked to homepage of courses * move channel navigation in its right container, clean its display and related templating; * display a Completed badge for completed courses; * display a cropped image for channel image card in order to avoid blank lines around image not having the right aspect ratio; * use standard qweb widgets, notably float_time; * make header and footer of /slides and /slides/all editable and improve their styling; * remove old and unused css linked to previous versions of homepage; * various small code cleaning; Commit linked to task ID 1941250 and PR #31279. Co-Authored-By: Thibault Delavallée <tde@odoo.com> Co-Authored-By: Stefano Rigano <sri@odoo.com>
2019-02-20[REF] website_slides: use mixin.image on channel and slide modelsThibault Delavallée
This recently introduced mixin allows to hide complexity of defining, using and resizing images. Let us use it in channel and image model. Commit linked to task ID 1941250 and PR #31272.