summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src
AgeCommit message (Collapse)Author
2021-05-28[FIX] website_forum: fix image display in a forum postYounn Olivier
The container size of a forum post was not correct when an image was displayed with right or left alignment. The css property clear was added at the end of the posts so that floating elements do not float over the next section. task-2469516 Part of https://github.com/odoo/odoo/pull/70235 X-original-commit: 0c58901cbef8b1d1808f673b7b34d1de93c2fd6d
2021-03-17[FIX] website_forum: show normal image modal in forumNicolas Lempereur
In #67893 the image icon was removed, but it contradicts the interface and made a feature that was working for employee less available. Since saas-12.3, we always use the full media dialog when showing the editor on the forum so we could not add an image with the image icon if were not an employee. Before saas-12.3, the original summernote image dialog was shown for everyone but website editor that saw the full media dialog (beecause we are using the same editor to do both things). With this change, we always have the original dialog in the forum message editor thanks to a new option "disableFullMediaDialog". opw-2470720 closes odoo/odoo#68018 X-original-commit: 74af23fb0be60c996503ad599eb96bc2ab4d64f9 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-15[FIX] website_forum, *: refit the forum biography popoverOussama MESSAOUDI
*: web task-2276974 closes odoo/odoo#66049 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-17[FIX] website_forum: remove o_we_selected_image class on post imagesBenjamin Vray
Before this commit, the o_we_selected_image class was not removed from forum post when saving. task-2312878 Part of #66316 closes odoo/odoo#66384 X-original-commit: 876bb9cb06097db54d3c02a57a6d4b35eee0107c Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-17[FIX] website_forum: fix selector in event of the submit btn of a postBenjamin Vray
A comma was removed in the following commit for no reason 912996fe902c41cafa12dcfe09713ce9857f95ab . Because of this, the click event of the forum post submit button was not working. task-2312878 Part of #66316 X-original-commit: 3509d438133de46ef02bb70255c7cd737a695f15
2020-12-04[FIX] website_forum, website_profile: disable editor toolbar optionsBenjamin Vray
Before this commit, the inline style added with some options of the editor toolbar when editing a textarea was removed due to the strip_style of the content field. Since we cannot remove this strip_style for security reasons, we can only disable options that add inline style. This commit closes #34288 closes odoo/odoo#62906 X-original-commit: 74e4114e20186e31343af12a673fa3e4bc4eac4a Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-30[FIX] website_forum: fix link and media option in wysiwyg editorBenjamin Vray
Before this commit, link and media buttons of the wysiwyg editor toolbar in the forum were never displayed. It's because we were not using the right option names in the toolbar object. Thanks to @kirtangajjar for initial bug fix. Closes https://github.com/odoo/odoo/pull/53589 task-2369420 closes odoo/odoo#61095 X-original-commit: 88a693fa5b8852596e623e08f5eb846b9988b5d7 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-29[FIX] *: correct typos and bad EnglishMartin Trigaux
Courtesy of translators Reexport .pot of modified modules closes odoo/odoo#61002 Related: odoo/enterprise#14485 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-22[IMP] website, *: move page scrollbar to #wrapwrapqsm-odoo
*: web, web_editor, portal, account, website_blog, website_forum This is probably not ideal to move the scrolling behavior out of the html element but this will be needed for the editor to not have a double scrollbar on the right. This is actually also useful for the scrollbar to appear under the purple odoo menu instead of its right. This commit, if to be reverted in the future, however contains many improvements to make the transition easier that should be kept: jQuery and Odoo functions to be able to scrollTo a specific element, get the top scrollable element, check if an element is scrollable, etc. Also, some magic was done: if some code tries to scroll to a specific scroll position via jQuery's scrollTop or animate functions on the html/body element, those will still work as intended (obviously, using the new utils to do that is however recommended). This commit also reviews our scroll behaviors to make them more robust and share the code. Part of https://github.com/odoo/odoo/pull/57975 task-2344227
2020-07-16[FIX] website_forum: fix traceback on commentJeremy Kersten
Before this commit, try to post a comment will raise a traceback in front end because textarea is not found. Now, we check that we are writing in textarea content and no more in textarea comment. closes odoo/odoo#54595 X-original-commit: 867458456b13daf9b5586c17b7475e68d9d008e1 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-14[IMP] website_forum: frontend improvements and correctionsOkan SUMER (osu)
This commit adds new features and corrects some others in the frontend of website_forum app. - In the "about" section of a forum, use the s_accordion instead of a custom one for the first 3 elements, the last one is on a new page accessible from a link below the accordion - Cut the description after a specific amount of characters in the page where all forum are listed - In that same view, create options that show the number of post and the last post a forum has. Create an option to render forums in list view - Allow the user to cancel his vote (down or up) - Hide the answer box in the post view. Make it appear when the user click on the "answer" button - Use a JS public widget to validate a Post form (new, save, comment) - Enable the modification of a forum's image from the frontend - Hide Solved/Unsolved categories in "Discussion" forums - Disable the possibility to add snippets to an answer - Corrections of tours that broke after these modifications Part of https://github.com/odoo/odoo/pull/46634 task-2201708
2020-05-14[IMP] website_forum: rename fields, labels, texts,...Okan SUMER (osu)
This commit rename every "Question" references by "Post" to make it appropriate for both forum's type (Question and Discussion) It renames some other fields/labels to be shorter or with a capital letter at the start. Update demo data to add a title to answers Part of https://github.com/odoo/odoo/pull/46634 task-2201708
2020-04-01[FIX] website_forum: force image size in css to handle gifsjvm-odoo
Issue - Preferences > Change your avatar with a big .gif - Install Forum - Go on a question The gif is not resized in the nav and in the post answer box Cause In fact, all gifs are not really resized. They just look fine because there is CSS to handle the case where the server resize does not work. Solution Do as it is done everywhere else, add CSS rules OPW-2223260 closes odoo/odoo#48792 X-original-commit: 35137cea7fd0eef067749721ef808acd298e0aae Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-28[IMP] website_forum: Add privacyjbm-odoo
Add privacy on forum: public or private. If private, we must select one group that has access. For forum linked to eLearning course: the privacy of forum is the same as the course. If the course is not yet published, the forum will be invisible (unless we have the group group_website_slides_officer). If a forum linked to a course is unlinked or removed, the forum will become private and his group will be set to group_website_slides_officer. All posts and tags have the same access rules as their linked forum. closes odoo/odoo#43486 Taskid: 2169965 Related: odoo/upgrade#758 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-11[IMP] website_livechat,website_forum: option hidden after installationBhavita Bhatt
In this commit we deleted tour file of website_forum beacause of the changes applied on forum icon of new click button, live chat icon disappear after livechat module installed and modified livechat channel data for auto-publish channel. task-2088546 closes #40085 Related: odoo/enterprise#6639 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-03[IMP] website_forum: show share buttons only on validated questionPriyanka Kakadiya
Before this commit: when a user asks a question on a forum, share buttons are always showing even if question is validated or not and hence it will lead to 404 error. After this commit: when a user asks a question on a forum, share buttons will only show after a question is validated. task-2064874 closes odoo/odoo#37505 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-05[IMP] website_forum: Adapt tests to work with/without demo dataYannick Tivisse
2019-10-01[IMP] website_forum, *: review forum listing pagesri-odoo
* website_slides_forum In particular: add a specific design for forum with description and separate the 'course' forum from the rest of them. Part of https://github.com/odoo/odoo/pull/35749 task-2024197 Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-10-01[IMP] website_forum, *: revamp designsri-odoo
* web_editor, website_profile Part of https://github.com/odoo/odoo/pull/35749 task-2024197 Co-authored-by: Jérémy Kersten <jke@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com> Co-authored-by: fja-odoo <fja@odoo.com>
2019-09-10[IMP] web_editor, *: introduce wysiwyg frontend loaderqsm-odoo
* website_forum, website_profile - Share some code between website_forum and website_profile by exposing a function in web_editor to instantiate a wysiwyg instance on a textarea - Use no-lazy loaded JS to add a visual loading effect while the wysiwyg is not yet available. This is made in preparation of task-2024197 (see https://github.com/odoo/odoo/pull/35749) Thanks to @stefanorigano closes odoo/odoo#36581 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-21[REF] web_editor, website: adapt wysiwyg to 12.0 editorGorash
The wysiwyg abstraction layer was introduced in saas-12.2 by commit f2969923. Its goal was to provide an external interface for other modules that wanted to use the editor feature such that the editor core itself could be changed without requiring extensive changes in the other modules. This commit is adapting the wysiwyg interface to instantiate the 12.0 editor below it rather than the saas-12.2 one, thus reverting the "new editor" part of f2969923 itself. Part of PR 35677. Co-authored-by: Nicolas Bayet <nby@odoo.com> Co-authored-by: Antoine Guenet <age@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com>
2019-08-14[MERGE] forward port branch saas-12.4 up to 98a55917a60Christophe Simonis
2019-08-08[MERGE] forward port branch saas-12.3 up to 752b2553c6fChristophe Simonis
2019-08-06[MERGE] forward port branch saas-12.2 up to 9e74730a26bChristophe Simonis
2019-08-05[FIX] website_forum: restore the possibility to change accepted answerqsm-odoo
The design for accepted answers changed a lot and with it, the possibility to remove or change accepted answers was gone. This commit tries to reintroduce the possibility without breaking the design and by making an unique attribute addition to the XML (stable change). task-2034497 closes odoo/odoo#35445 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-05[FIX] website_forum: restore star icon color for favorited questionsqsm-odoo
task-2034497
2019-08-02[IMP] website_forum: bring forum modesAndrea Ulliana
It is now possible to specify the forum mode : Questions and Answers or Discussions. In Q&A mode, a user can only reply once while there is no limit in Discussions mode. task-2008910 closes odoo/odoo#34097 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-12[MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6a1823Martin Trigaux
closes odoo/odoo#34820 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-05[MERGE] forward port branch saas-12.2 up to be5e8fdab80Christophe Simonis
2019-06-27[MERGE] forward port branch saas-12.3 up to 0247d2f35fdChristophe Simonis
2019-06-27[MERGE] forward port branch saas-12.2 up to 465909f0fdeChristophe Simonis
2019-06-27[MERGE] forward port branch 12.0 up to cd21c016b06Christophe Simonis
2019-06-28[FIX] website_{profile, forum}: migrate events from forum to profilemgh-odoo
After this commit https://github.com/odoo/odoo/commit/ff870099c588e56 some of the events are left in website_forum, that caused some buttons to be inactive. In order to fix that events moved to website_profile. Note: code is moved as it is. Cleaning class / namespace will be done in master to avoid issues due to stable version. Related to task 2006045 closes odoo/odoo#34138 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-24[FIX] website_forum: default karmaNicolas Martinelli
- Set the 'Editor Features: image and links' karma point to zero. - Set a user with a total karma points < 30 The user doesn't see the links buttons in the editor. This is because of an old fallback from 2014 which doesn't make sense anymore today. opw-2026025 closes odoo/odoo#34325 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-06[MERGE] forward port branch saas-12.3 up to 409679866b2Christophe Simonis
2019-06-03[MERGE] forward port branch saas-12.2 up to 995aa1685eeChristophe Simonis
2019-06-05[IMP] *: move test and tour files to new folder hierarchy and assetRomain Derie
As we now have a new debug mode 'tests' which load a new asset bundle containing tour-test files, we moved those files to a new folder hierarchy. That will clean the .js files trees. Also, those files should be included in the new asset. Basically, the .js tour files (not test) should be inside /static/src/js/tours while .js tour test files (test=true) should be inside /static/tests/tours next to QUnit tests, inside a tours folder. + test_new_api: don't run the test in debug assets task-1934445 Comes with https://github.com/odoo/enterprise/pull/4281 Closes #33213
2019-06-04[IMP] website_forum: review design of forum indexElisabeth Dickinson
- Allow to set an image on each forum - Review the form view - Redesign the forum index with cards and header task-1984582 closes odoo/odoo#33530 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-07-30[FIX] web, *: make crash_manager use services correctlyfja-odoo
* = website_forum, stock Fix for: https://github.com/odoo/odoo/pull/32132 crash_manager.js was using the services while bypassing ServiceProviderMixin That means all services are duplicated, each having their own state. To fix this issue, CrashManager now extends AbstractService. Also crash_manager is now registered in serviceRegistry instead of being instanciated on the fly. The crash_manager now being a Service raise one issue with the tests: The services are not run for the tests but some tests needs the crash_manager 'unhandledrejection' listener. For that matter the services are reenable in qunit. Also the crash_manager's 'unhandledrejection' listener has to have precedence over the qunit listener as it will handle rejections wich have no reason or are not Errors. Part of: https://github.com/odoo/odoo/pull/35209
2019-07-15[MERGE] Forward port of saas-12.4 to master up to 1f5a4649a67908Martin Trigaux
closes odoo/odoo#34850 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-06[MERGE] forward port branch saas-12.2 up to 78b3b650b0dChristophe Simonis
2019-06-28[IMP] website_forum: display forum errors with notiffja-odoo
Previously the Forum errors were handled with a popover, now the errors will be consistent with the crash_manager and display a toast notification via the show_warning method. Also the KarmaError were previously not displaying the karma needed to perform the action. Now it will display the amount in the error message. The CrashManager show_warning method will now take an options dictionary as a second argument to override it's default behaviour. Part of https://github.com/odoo/odoo/pull/32132 task-1894820
2019-06-28[FIX] website_forum: remove unused close notif eventfja-odoo
This code was not used properly and was triggering useless rpc. This code was used in the deprecated badge system and we forgot to remove it. Commit where the code should have been removed: ec212de5c7a7b0f4b74549add62a2988f5b38ee6 Commit where a quick fix was made: 1e1ea00e66686d76a36fa0c19c3e4865e3161031
2019-05-20[FIX] website_forum: fix column sizeJeremy Kersten
Until know, we suppose that <div id='first' class='col-1'><div id='second' class='col'> will be on the same line, with the second div that take the left space. But that not the case, if you don't force the second to col-11 and that the content is too long, if will show the div like a col-12 instead of a col-11. Their are probably others case in the migration of bs3/bs4 to handle. + add word-wrap on the question to avoid long content that have overflow below the right column.
2019-05-21[IMP] web, *: add utils to get dataURL (base64) from file/blobSébastien Theys
* = partner_autocomplete, point_of_sale, web_editor, website_forum, website_slides This can be used for example to preview an image from a file input field. It can also be used to send the base64 content of the input by RPC instead of having to rely on form submit as POST with multipart/form-data. Technically wrap FileReader.readAsDataURL in a Promise. This will also be used in task-1930726 PR: #33508 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-13[MERGE] forward port branch saas-12.3 up to 60e71302a38Christophe Simonis
2019-04-23[FIX] website_slides_forum: fix navbar overflow and mobile bgsri-odoo
Linked to task 1958372 Related to PR #32648
2019-03-26[MERGE] forward port branch saas-12.1 up to f00c490be86Christophe Simonis