summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src
AgeCommit message (Collapse)Author
2019-04-10[IMP] website_forum: improvement karma error messageJuhil Somaiya
Changed the error message when the user hasn't enough karma. Add link to the FAQ to understand how to get more karma. Task-ID: 1952473 Closes: #32161 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-27[MERGE] forward port branch saas-12.2 up to 7c1a9a8204fChristophe Simonis
2019-03-26[MERGE] forward port branch saas-12.1 up to f00c490be86Christophe Simonis
2019-03-25[MERGE] forward port branch 12.0 up to 11b1e12cde3Christophe Simonis
2019-03-22[FIX] website_forum: BS4, restore edit profile pageqsm-odoo
+ Add some spacing between the navbar and the forum layout closes odoo/odoo#32060 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-15[IMP] website(_profile,_forum,_slides): move validation email to profile and ↵David Beguin
use in forum and elearning Email validation was necessary on the forum to be able to begin to use the forum (ask or answer questions, vote, etc..) As the new elearning also uses karma since 705376a982d64fb41800f148a167ef0fc28ce4c6, the email validation is now also necessary in the eLearning platform. This is why this commit is moving the email validation process to website_profile and extend website_slides (eLearning) and website_forum to use this feature. In function of where the user asked to send him the validation email, the user is redirected on the forum or on the elearning when he clicks on 'Validate my account' in the received 'email validation' email. Task ID : 1943788 PR #31321
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-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_forum: 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-06[FIX] website_slides_forum : fix elearning navbar style in forumDavid Beguin
Since design refactoring from af41382fa182fde43f8a52cb33171071f42dcd20, eLearning navbar style was not displayed correctly. This commit fixes this by applying same design rules as user profile page navbar. Task ID : 1941250 PR #31512
2019-02-14[IMP] web_editor: lazy load the wysiwygChristophe Matthieu
Issue: wysiwyg asset slow down the loading of the website, error inadvertently introduced: https://github.com/odoo/odoo/pull/29775 The assets are now loaded assynchroneously, when the editor is needed, its assets will be loaded. closes odoo/odoo#30700
2019-02-14[REF] website_forum : use website_profile templates and adds forum specific ↵David Beguin
information Adds forum specific information into the website_profile template page. Removes everything linked to profile that is already in website_profile module to avoid duplicates. As there can be more than one forum, the profile page shows everything linked to every forum, except if the forum id is given in url arguments. The old route (forum/forum-1/user/user_id) have been kept for backward compatibility reasons. Adds the 'Go to forum' button in the 'new rank reached' mail to encourage the users to continue to be active on the forum as well, to gain more karma point and improve there rank. Image rpc calls have been reviewed for profile page part to use only the standard way to get image -> web/image/model_name/id/image_size Task ID : 1922159 PR #30988
2019-02-14[ADD] website_profile : add profile page template for website modulesDavid Beguin
Move Profile part from website_forum into this module in order to be usable in other modules (like website_slides) that will depend of this module. Applies gamification.ranks on website_profile page. Show the current rank and the next rank but also the progression until the next rank. Adds also an 'about rank' page to allow users to know more about available ranks. The goal here is to make the profile page more modular and to allow other modules to add informations or modify easily link or part of profile page in order to be specifically contextualised for the module in question. Task ID : 1922159 PR #30988
2019-02-27[REF] *: definitely get rid of web_editor.baseqsm-odoo
* portal, sale, website, website_blog, website_crm, website_event, website_event_sale, website_forum, website_hr_recruitment, website_sale, website_sale_wishlist At last, that ugly JS module can be removed. Before this current PR, it was still used to wait for "page ready", to initialize widgets on page loading. Now, all can be done thanks to public root and public widgets. web_editor.base was also still used in tours, which should not be necessary anymore for the same reason, especially since the tour manager waits for the public root naturally. Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-26[REF] website, *: use public widgets instead of website animationsqsm-odoo
* website_blog, website_crm_partner_assign, website_event, website_event_track, website_form, website_forum, website_links, website_mail, website_mail_channel, website_mass_mailing, website_sale, website_sale_comparison, website_sale_delivery, website_sale_stock, website_sale_wishlist, website_slides, website_twitter While using the 'Animation' class of website instead of the frontend 'Widget' class leads to the same behaviors, this refactoring is done for two reasons: - Stop using the confusing 'Animation' name for non-animated behaviors - Instantiation of 'Widget' is slightly faster than 'Animation' Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-26[REF] website, *: move and review the notion of edit modeqsm-odoo
* portal, sale, web, website_blog, website_crm_partner_assign, website_forum, website_event_track, website_links, website_mail, website_slides, website_mail_channel, website_mass_mailing, website_sale, website_sale_comparison, website_sale_delivery, website_sale_wishlist The `editableMode` option and its related options in public widget should only be part of website, this commit moves them there. This is also the occasion to implement something that is long overdue: stop creating 'animations' / public widgets in edit mode by default. Indeed, lots of 'animations' were defined by beginning with 'if not edit mode'. Now, if a public widget should be considered in edit mode, it must be defined explicitely through a property at *definition* of the widget. Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-26[REF] website, web, *: move part of website into webqsm-odoo
* im_livechat, survey, website_forum When website is installed, the JavaScript code has access to utilities to define improved widgets which are automatically attached to existing DOM elements on page load. Those mechanics are more and more needed in portal which does not depend on website (as it is website which depends on portal). This commit moves part of website JS to web, so that it can be used by all 'frontend' apps whose only common dependency is web (portal, survey, auth_signup, ...). This PR also questioned several other similar issues which will be handled later like: - website should maybe not depends on portal but only on http_routing - part of portal should be moved to http_routing and http_routing should be renamed (especially for frontend layouts, etc) so that apps like survey can reuse some common code Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-05[REF] website, *: remove 'website.context' moduleqsm-odoo
* website_forum, website_gengo, website_mail_channel, website_sale Retrieving the global context is now the root's job, this will prevent problems when trying to extend the values the context has. See upcoming improvements with https://github.com/odoo/odoo/pull/29442 closes odoo/odoo#30816
2019-01-23[FIX] website_forum: small ui fixJeremy Kersten
Force image to stay in their container (img_fluid could be removed by end user) Stop to use row_users now that we use bs4, allow to be more responsive, force height to be the same for each card. Small imp replacing multiple if by elif Decrease big margin between questions Place tag on the top (if you have many tag, or very long, the ui is broken)
2019-01-23[FIX] website_forum: use same dom for all iconJeremy Kersten
Before this commit we try to imitate the btn with the form (eg. flag button) But if you style in a theme your button and not the form (like odoo.com) you will see a difference between the 4 icons.
2019-01-23[FIX] website_forum: prefix forum css rule to avoid side effectJeremy Kersten
prefix class where forum is not specified in the classname to avoid to have some element on others pages that are stylized.
2018-12-11[FIX] website_forum, *: remove underline on icon buttons hoveringqsm-odoo
* portal In our default theme, when hovering links (or .btn-link elements), the text is underlined. This effect is however not desired for links which contain only an icon, especially in the forum. This commit removes that underline effect for all icon buttons in the frontend (at least by default, this is a theme choice). Icon buttons are defined as link or .btn-link elements which directly use the "fa" class on them. This commit also solves the flag button of the forum which did not have any effect because of bad bootstrap use. closes odoo/odoo#29434
2018-12-06[REF] website_forum: mass moderation, modern UI bs4 and clean typeJeremy Kersten
Now forum only allow to post message of type 'question'. New 'modern' UI with Bootstrap 4 New moderation modal for bulk spam Co-authored-by: qha <qha@odoo.com> Co-authored-by: qsm <qsm@odoo.com> Co-authored-by: jke <jke@odoo.com> Thanks to @qha-odoo for UI Thanks to @qsm-odoo for reviewSsss closes odoo/odoo#29235
2018-11-28[REF] website_*: review reorganization and enforce conventionsqsm-odoo
Review the JS reorganization made by direct parent commits and do more to use our defined JS conventions. Also simplify JS which can be obviously improved.
2018-11-28[REF] website_forum: reorganize javascriptAndrea Ulliana
2019-01-28[MERGE] forward port branch saas-12.1 up to d3b8422c9c4Christophe Simonis
closes odoo/odoo#30614
2019-01-24[FIX] website, *: restore 'animation' system to the way it workedqsm-odoo
* website_forum Following the new editor's merge at https://github.com/odoo/odoo/pull/29775, the website 'animation' system was 'extended' to vaguely use a 'Registry' instance instead of an object. This was however left undocumented, with a require in the middle of a file, restarting all animations when used, only used by website_forum... with more code for no reason at all, ... This commit restores the system to the way it was before and re-adapts website_forum: - No need to check if website_forum is in the DOM as it is already checked by the animation system (on top of that... the new code was checking the DOM before it was ready...). - No need of a dynamic add on a registry, this is always done before the DOM is ready, so before the animations are started. - No need to know the root instance in website forum, just use the animation as the Wysiwyg instance's parent. The goal of this commit is also to avoid useless conflicts with https://github.com/odoo/odoo/pull/29442 (that should not have had any conflict at all as totally independent of the editor task...) closes odoo/odoo#30478
2019-01-22[REF] website, *: rename and simplify web_editor.contextChristophe Matthieu
* website_forum, website_gengo, website_mail_channel, website_sale Following the new editor's merge at https://github.com/odoo/odoo/pull/29775, the web_editor.context module was moved to website without being renamed. This commit renames it to website.context but also merge the website extension that was made to that context directly within its definition. closes odoo/odoo#30409
2019-01-17[IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' fieldChristophe Matthieu
* Creating a new structure by transforming all the plugins in the library using the odoo inheritance system. Plugins are easier to implement with the AbstractPlugin to add Odoo behaviors. * From now on, the methods of the library (in this case Summernote) can no longer be called by other modules or files. Only the wysiwyg widgets can access it, to simplify the updating process. The wysiwyg object serves as an interface. * Depending on the options the snippets will be loaded or not, the editor will be in an iframe or not... all of this is transparent from the outside. * Regarding iframes, all controllers related to editing have been removed: the new API no longer needs them. This speeds up loading, eases testing and removes complexity for the same features. PUBLIC FEATURES There are several public methods on the Wysiwyg class: * Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the library (xml, lazy, assets...) is loaded. * Wysiwyg.getRange (DOM): returns the range (selection in the dom) * Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates a range (selection in the dom) * Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an element (option available to select all, start or end) A jQuery selector was added: :o_editable, which indicates whether the current element is editable. That is, if it is contained in a tag with the attribute 'contentEditable = "true"' or in a tag with the class o_editable. Several methods are also present: * focusIn: makes a focus and places the cursor at the beginning of the element * focusInEnd: makes a focus and places the cursor at the end of the element * selectContent: makes a focus and selects the content HTML FIELD The HTML field can receive different options: * style-inline: {boolean} transforms a class into an inline style when saving and vice versa when reading. * no-attachment: {boolean} prevents the use of attachments (in media dialog) * cssEdit: {xml_id} to use a template containing the css to loaded in an iframe when editing * cssReadonly: {xml_id} to use a template containing the css to load into an iframe when viewing in readonly * snippets: {xml_id} snippets template (can be used with or without cssEdit) * wrapper: {template} qweb static template (containing a tag: id = "wrapper") that will include the content during editing (removed on save) MASS MAILING A widget was created for mass mailing. There are now two fields: body_html and body_arch. body_arch contains the code with the class without conversion into inline style, useful when editing and one with the inline style that is visible in readonly mode and sent by email. Advantage: no spreading errors, able to update css/theme, able to do more changes when converting to inline style so that a maximum of mail clients have an impeccable rendering. Co-authored-by: Antoine Guenet <age@odoo.com>
2018-09-25[IMP] website: add quick install from "new content"Sébastien Theys
This gives the user an overview of the possible actions, including those he currently does not have installed. It allows him to quickly install the missing applications without having to go on the backend. The commit also improves the existing actions: - correct handling of the actions deferred - add some translated terms PR: #27110 task-1885419
2018-09-13[IMP] website(_*): typo, margin, missing href, font sizing, ...Jeremy Kersten
Misc fix/imp according FGI request/test task-1878245
2018-08-31[FIX] web_editor, website(_*): fix bs4Romain Derie
[FIX] web_editor: adapt col size to avoid too small select We should avoid col-md-3 in col-md-9 as the menu dialog is instanciated at 2 places: - When creating a link in the editor - When editing website navbar menu In the second case, there is a hack in `content.js` to remove `modal-lg` lowering the width of the modal and making the select too small. [FIX] website: lower navbar font size With BS4, font-size of navbar element went from 13px to ~17px (rem unit computation). 14px seems better than previous 13px as the frontend content size is higher than the backend one. Thus, 13px looks too small in contrast with the frontend page content. [FIX] website_crm_partner_assign, website_customer, website_membership: fix layout This commit fixes multiple layout issues, mainly by aligning code of the 3 modules: - Add margin right to avoid text to be against image - Using image_medium everywhere - Fixing search input width publish toggle red + odoo primary is weird -> gray navbar now has a background & float-right not working since flex -> remove navbar class, use d-flex and ml-auto so the right element will be floating since using all available width task-1878150
2018-08-31[FIX] *: BS4, adapt page-header classSanjay Jamod
Closes https://github.com/odoo/odoo/pull/26420
2018-08-23[IMP] website, website_forum: add a class modal_shown on modal once css ↵Jeremy Kersten
animation is completed Use this new class in website_forum to avoid that the tour click during the animation and fail randomly. https://getbootstrap.com/docs/4.0/components/modal/#events
2018-07-31[FIX] *: BS4, restore modal headersqsm-odoo
Close icon should now be put after the modal title in the DOM. Completes commit https://github.com/odoo/odoo/commit/d9801c1abe06b4c20702c0e94c56eea6a3ed8327
2018-07-27[REF] *: BS4, adapt the label component structureqsm-odoo
The '.label' elements have been replaced by '.badge' elements without the 'badge-pill' class.
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] *: BS4, review panel and well structureqsm-odoo
Panels and wells were dropped and replaced by the "Card" component.
2018-07-27[REF] *: BS4, adapt col-related classesqsm-odoo
col-lg-* -> col-xl-* col-md-* -> col-lg-* col-sm-* -> col-md-* col-xs-* -> col-* col-lg-offset-* -> offset-xl-* col-md-offset-* -> offset-lg-* col-sm-offset-* -> offset-md-* col-xs-offset-* -> offset-* col-lg-pull-* -> order-xl-1 col-md-pull-* -> order-lg-1 col-sm-pull-* -> order-md-1 col-xs-pull-* -> order-1 col-lg-push-* -> order-xl-2 col-md-push-* -> order-lg-2 col-sm-push-* -> order-md-2 col-xs-push-* -> order-2
2018-07-09[FIX] *: fix some side-effects of ↵qsm-odoo
https://github.com/odoo/odoo/commit/9de1bc0eef6f5bfaa2a8d745431caa361ae91548 - JS Modals were not correctly built anymore, their .modal-body element was duplicated and many without-effect JS lines were introduced (as a side effect, the form view design was broken when inside modals) - Tests were changed to make bugs go unnoticed. For example, the media dialog functionnality was entirely broken because the .modal-dialog element was not receiving the correct class anymore. - The JS translation function is _t, not _ - Do not use the <title/> tag as a regular DOM element, it is meant to be unique, in the <head/> section - CSS rules were added to the utils.scss file, which is meant to contain functions and mixins, otherwise, the rule is duplicated in every asset - Some icons were still broken, as missed by https://github.com/odoo/odoo/commit/f90cf060a3cfeb37a67bec83264c0aaab8892b56 - Tests were changed to use [role="dialog"]/footer/header in their selectors without any reason, this commit restores some of that to avoid rebase conflicts with the BS4 work. - ... Note: other elements should still be discussed, like the direct use of the 'o_form_label' class in views definition... but those do not cause direct problems.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe Simonis
2018-05-08[MERGE] forward port branch 11.0 up to f2e105eeca4Christophe Simonis
2018-05-08[FIX] website_forum : fix karma alert-box positionPriyanka Kakadiya
Currently, if user does not have enough karma to perform specific action on forum, alert-box with appropriate message is displayed to the user. There are several issues with these alert-boxes, like : - Click on same CTA multiple times, creates multiple alerts - Click on another CTAs keeps previous alerts on the screen, and adds further alerts, which sometimes overlaps adjacent CTA and looks ugly. After this commit : - Alerts are displayed below their related CTAs - Only one alert appears at a time on the screen Fixes : #23071 PR : #23800 Task# : 1829835 This commit closes #23071 This commit closes #23800
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.
2018-01-29[REF] *: convert sass content to less contentqsm-odoo
* note, payment, sales_team, website_forum, website_sale(_options) (prepare for all less -> scss conversion)
2018-01-29[REF] *: rename sass files to less filesqsm-odoo
* note, payment, website_forum, website_sale(_options) This is a simple renaming of sass files to less files. The real convertion will be done in the commit that follows.
2017-09-12[MERGE] forward port branch saas-17 up to d08b4407be3Christophe Simonis
2017-09-11[MERGE] forward port branch 10.0 up to 7d7e94c6ef4Christophe Simonis
2017-09-08[FIX] website_forum: fix display of images in a postLucas Perais (lpe)
Before this commit, the images were messing up the layout of the post, with text uglily lying on their right This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner. Also, we want this commit to have minimal impact OPW 769721 closes #19322