Commit Graph
217 Commits
Author SHA1 Message Date
Juhil Somaiya 92685d33a5 [IMP] website_forum: improvement karma error message
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-04-10 06:28:48 +00:00
Christophe Simonis 6b4758cd9a [MERGE] forward port branch saas-12.2 up to 7c1a9a8204 2019-03-27 14:29:01 +01:00
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
qsm-odoo aed56c9bda [FIX] website_forum: BS4, restore edit profile page
+ 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-22 16:55:29 +00:00
David Beguin fb40c6bf60 [IMP] website(_profile,_forum,_slides): move validation email to profile and 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 705376a982,
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-15 14:58:28 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00
3482e3a5a7 [REF] website_forum: adapt code after jQuery update
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 20:07:17 +01:00
David Beguin 6aedd56c40 [FIX] website_slides_forum : fix elearning navbar style in forum
Since design refactoring from af41382fa1, 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-03-06 14:09:16 +00:00
Christophe Matthieu b49745e52d [IMP] web_editor: lazy load the wysiwyg
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 15:11:19 +00:00
David Beguin 336a90e530 [REF] website_forum : use website_profile templates and adds forum specific 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 08:30:29 +00:00
David Beguin ff870099c5 [ADD] website_profile : add profile page template for website modules
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-14 08:30:29 +00:00
qsm-odoo da1899af48 [REF] *: definitely get rid of web_editor.base
* 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-27 10:02:46 +00:00
qsm-odoo d946b7a85d [REF] website, *: use public widgets instead of website animations
* 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 17:09:23 +00:00
qsm-odoo 335a505d1f [REF] website, *: move and review the notion of edit mode
* 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 17:09:22 +00:00
qsm-odoo 7b960c66bb [REF] website, web, *: move part of website into web
* 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-26 17:02:59 +00:00
qsm-odoo b6db6b878c [REF] website, *: remove 'website.context' module
* 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-02-05 11:39:11 +00:00
Jeremy Kersten 7805c55b0c [FIX] website_forum: small ui fix
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 17:03:04 +00:00
Jeremy Kersten fe62c45e70 [FIX] website_forum: use same dom for all icon
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 16:35:32 +00:00
Jeremy Kersten c2b4ff9d4e [FIX] website_forum: prefix forum css rule to avoid side effect
prefix class where forum is not specified in the classname to
avoid to have some element on others pages that are stylized.
2019-01-23 16:35:32 +00:00
qsm-odoo 1144235d06 [FIX] website_forum, *: remove underline on icon buttons hovering
* 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-11 14:31:42 +00:00
Jeremy Kersten 1c5ffe1737 [REF] website_forum: mass moderation, modern UI bs4 and clean type
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-12-06 20:49:42 +00:00
qsm-odoo 6d67ce5b7c [REF] website_*: review reorganization and enforce conventions
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 10:28:53 +00:00
Andrea Ulliana 2cdcdedef6 [REF] website_forum: reorganize javascript 2018-11-28 09:49:09 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
qsm-odoo a00e6f3dd1 [FIX] website, *: restore 'animation' system to the way it worked
* 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-24 09:48:47 +00:00
Christophe Matthieu cb7589aaa5 [REF] website, *: rename and simplify web_editor.context
* 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-22 17:55:00 +00:00
Christophe MatthieuandAntoine Guenet f296992317 [IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' field
* 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>
2019-01-17 08:40:21 +00:00
Sébastien Theys 2ab6ce80d6 [IMP] website: add quick install from "new content"
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-25 16:23:08 +02:00
Jeremy Kersten f1e1b6aa8f [IMP] website(_*): typo, margin, missing href, font sizing, ...
Misc fix/imp according FGI request/test

task-1878245
2018-09-13 08:17:09 +02:00
Romain Derie 6bfb0810b0 [FIX] web_editor, website(_*): fix bs4
[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 16:37:45 +02:00
Sanjay Jamod 2b51fefa5e [FIX] *: BS4, adapt page-header class
Closes https://github.com/odoo/odoo/pull/26420
2018-08-31 12:01:36 +02:00
Jeremy Kersten 5b0327f650 [IMP] website, website_forum: add a class modal_shown on modal once css 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-08-23 13:49:01 +02:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
Priyanka KakadiyaandNimesh Jethva c7eae6552e [REM] various: remove index.html for apps.
Several applications have an index.html file that is used to fill the html
description of the module. However those descriptions are generally not
up to date: they contain outdated screenshots, feature descriptions are
not maintained, ...

Instead we just rely on the discover button that redirects on the application
website. It has more chance being up to date. Moreover updating a website
is easier than updating the index.html of a module.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:54:42 +02:00
qsm-odoo 37b746c6cf [FIX] *: BS4, restore modal headers
Close icon should now be put after the modal title in the DOM.
Completes commit https://github.com/odoo/odoo/commit/d9801c1abe06b4c20702c0e94c56eea6a3ed8327
2018-07-31 13:07:48 +02:00
qsm-odoo ee65b44d9e [REF] *: BS4, adapt the label component structure
The '.label' elements have been replaced by '.badge' elements without
the 'badge-pill' class.
2018-07-27 12:36:54 +02:00
qsm-odoo d48b8593dd [REF] *: BS4, 'pull-left/right' -> 'float-left/right' 2018-07-27 12:36:54 +02:00
qsm-odoo 59237ea819 [REF] *: BS4, review panel and well structure
Panels and wells were dropped and replaced by the "Card" component.
2018-07-27 12:36:54 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
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-27 12:36:54 +02:00
qsm-odoo 2c966909e2 [FIX] *: fix some side-effects of 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-07-09 11:59:30 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
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-06-22 21:22:21 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Christophe Simonis 013ce7f889 [MERGE] forward port branch 11.0 up to f2e105eeca 2018-05-08 19:08:18 +02:00
Priyanka Kakadiya 7f632f909e [FIX] website_forum : fix karma alert-box position
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-05-08 12:38:13 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
qsm-odoo b3c5392b6a [REF] *: convert sass content to less content
* note, payment, sales_team, website_forum, website_sale(_options)

(prepare for all less -> scss conversion)
2018-01-29 15:37:28 +01:00
qsm-odoo 6bdb979b39 [REF] *: rename sass files to less files
* 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.
2018-01-29 15:37:28 +01:00
Christophe Simonis c5f680200c [MERGE] forward port branch saas-17 up to d08b4407be 2017-09-12 12:09:11 +02:00