summaryrefslogtreecommitdiff
path: root/addons/website_mail/static
AgeCommit message (Collapse)Author
2020-12-03[FIX] website_mail: adjust the visibility of the (un)subscribe buttonsBenoit Socias
Before this commit the visibility of the blog (un)subscribe/(un)follow buttons was behaving inconsistently because of a combination of specific CSS based on data values and the adding and removal of d-none classes. After this commit the visibility of the buttons is using only the CSS mechanism based on data values. Also adjusted the alignment of the email text input and its attached button (aligned in both blog & forum). Fixes https://github.com/odoo/odoo/issues/62714 closes odoo/odoo#62823 Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-27[FIX] website_mail: avoid sending too many RPCsRomain Derie
Before this commit, a JS widget would be instanciated for every `.js_follow` on the page. Every widget would then perform a RPC to know if the object was followed. That would be an issue if there was too many `.js_follow` on the DOM. Eg: on the forum tag page (/forum/1/tag), there might be unlimited tags. This is where the biggest issue is ATM, on Odoo.com we have over 5500 tags, which performs 5500 RPC. Your browser will most of the time just crash. This commit improves that behavior by sending only one RPC to get the tags info in once. With 5000 tags, there was 5000 RPCs, now there will only be one for the tags. Also, each RPC were doing 8 requests each, so this will bring requests from 40.000 to 80. Fixes #45576 closes odoo/odoo#46278 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-02[REF] {website_}mail: move and replace published field of mail.message to ↵Thibault Delavallée
is_internal PURPOSE Clean posting process and improve mail.message definition and comprehension. SPECIFICATIONS Website mail defines a website_published field allowing to publish / unpublish comments on the frontend of some modules. This field has several drawbacks : * it is used only for front-end people (portal, public) and has no real effect in chatter / classic discussions; * it is used only in some advanced front-end module and is not available in portal by default; * its naming is not really correct as it is not linked to fields coming from the website_published mixin and its behavior is not really the same; * its use is a bit duplicated with internal flag coming from subtype allowing to hide messages related to an internal subtype; * there are overrides of standard mail.message methods just to handle this flag; In this commit we change that field by an is_internal flag directly on mail.message model itself. It tells if share people (customers, share users) are allowed to read the message. This field can be given through posting API or set manually using widgets. It is also used in access rights custom methods and managed like the internal flag of subtypes. Mailgateway was already using an internal flag for internal note replies. It is renamed to is_internal and propagated as it is now a standard field. It also eases code understanding. Portal is updated to allow managing the flag directly. It means customer portal now natively allows to moderate customer comments without any need of website modules. Rating is updated accordingly. An is_internal field is added, replacing the related on website published. LINKS Task ID 2071556 PR #38692
2019-10-01[IMP] website_mail: allow two different designs for the follow buttonsri-odoo
Part of https://github.com/odoo/odoo/pull/35749 task-2024197
2019-08-21[MOV] website_mail: rename portal related filesThibault Delavallée
PURPOSE Fix frontend rating and clean a bit module organization SPECIFICATIONS In order to ease understanding of portal chatter dependencies let us name files according to guidelines. In this commit we rename a bit files in website mail to understand which widgets and portal parts are impacted by website mail bridge module. Assets are also moved in their own file to ease module discovering. LINKS Task 2057301 PR #35870
2019-03-06[REF] website_mail: 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-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] *: use 'frontend' system in non-website appsqsm-odoo
* account, auth_signup, payment, portal, project, sale, sale_management, web_unsplash, website, website_mail, website_rating, website_sale This commit does probably not do what is stated for all non-website apps but it is a first step. It also uses the system in apps which could have already used it but did not. Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2018-07-27[REF] *: BS4, 'pull-left/right' -> 'float-left/right'qsm-odoo
2018-07-27[REF] *: BS4, adapt formsqsm-odoo
The 'form-horizontal' class have been removed; the '.form-group' elements must now use the 'row' class for an horizontal layout. The 'control-label' class was renamed to 'col-form-label'. The 'help-block' class was renamed to 'form-text'. The 'has-error' and 'has-success' classes have been removed and replaced by a new system using the :valid and :invalid pseudo-classes, when a parent has the 'was-validated' class. While this system is great, it is not straightforward to use it in Odoo. Fortunately, BS4 provides the 'is-valid' and 'is-invalid' classes as fallback. This commit replaces the 'has-error' and 'has-success' classes by 'o_has_error' and 'o_has_success' classes (for JS compatibility) and use the 'is-*' fallback classes. (The 'has-warning' class has no equivalent but was unused in Odoo anyway).
2018-07-27[REF] *: BS4, adapt input-group structureqsm-odoo
The input-group-addon class has been replaced by a combination of the input-group-text and the input-group-append/prepend classes. The input-group-btn class is replaced by the input-group-append/prepend classes.
2018-07-27[REF] *: BS4, adapt display classesqsm-odoo
The system completely changed. I also had to adapt classes to new screen breakpoints. hidden/hide -> d-none show -> d-block hidden-xs -> d-none d-md-(block/inline/...) hidden-sm -> d-md-none d-lg-(block/inline/...) hidden-md -> d-lg-none d-xl-(block/inline/...) hidden-lg -> d-xl-none visible-xs-* -> d-* d-md-none visible-sm-* -> d-none d-md-* d-lg-none visible-md-* -> d-none d-lg-* d-xl-none visible-lg-* -> d-none d-xl-* hidden-print -> d-print-none visible-print-* -> d-none d-print-* ... and all possible combination of those had to be handled too.
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.
2017-08-16[MOV] portal,website_mail: move chatter frontend to portalJérome Maes
This split responsiblilies : - portal provides basic chatter for portal document, and website documents (slides, blog, ...). - website_mail provides comments moderation (unpublished mail message) - website_rating integrate rating when posting comments
2017-08-16[REF] web_editor, website, *: complete refactoringqsm-odoo
* mass_mailing, payment, point_of_sale, portal, survey, web, web_tour, website_blog, website_crm_partner_assign, website_event, website_event_questions, website_form, website_forum, website_gengo, website_hr_recruitment, website_links, website_mail, website_mail_channel, website_mass_mailing, website_quote, website_sale, website_sale_options, website_slides, website_twitter This commit reviews the whole "JS side" of the web_editor and website apps. This is a first step to be able to improve them with new and better functionnalities; this commit is not supposed to change any visual behavior. The main goal was to achieve a structure similar to the backend one. Now, the frontend side also has a root widget (like the WebClient) and all other widgets are attached to it one way or another. This allows the benefits of using the 'trigger_up' functionnality for example. As RPC are now mainly done with the `this._rpc` functionnality (being possible thanks to the parent hierarchy), the frontend will also be possible to test thanks to QUnit in a future update (besides the "text" editor side which still requires a refactoring to be able to do that). --- Here are some of the changes: (-) conventions and documentation The code has been updated to follow JS conventions and a lot of code has been commented (around +2000 lines of comment). This also means that lots of functions have been renamed to use camelCase or simply to make their name understandable. See https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines. (-) deprecated: web_editor.base The "web_editor.base" module has been split and does not force the modules which require it to wait for DOM ready anymore. This was indeed slowing loading times, but also prevented to use some modules in some contexts (see the LESS editor use in web_studio which is the subject of another task). Now the "editor context" can be got thanks to the "web_editor.context" JS module with its "get" function. The "web_editor.base" module should probably not be used anymore (see its code and recent updates). (-) new: web.dom_ready If a JS module should wait for the DOM to be ready to be executed, a new JS module has been created: "web.dom_ready". This should always be used in a module which only want to instantiate stuff. Do not extend (or worst, include) classes after DOM ready. (-) website.website The "website.website" module has been split. "website.website" does not return anything useful anymore, it just initialize some miscellaneous stuff, without waiting for the DOM to be ready. You might want to check "website.utils", "website.content.compatibility" or `WebsiteRoot`. Also `website.form` has been deleted (use `this._rpc`), so has been `website.error`. `website.prompt` will be removed in a future update to be replaced by `Dialog.prompt`. (-) widgets are great Many classes which were not widgets are now widgets. This allows them to use the 'events', the 'xmlDependencies' and the 'this._rpc' features for example. Here are some of the main ones: - Snippet options: these were classes with a `$el` for the menu element and `$target` for the customized element. This is still the case but following standard `Widget` structure (one exception: using `this.$(...)` searches in the `$target` as before this update). - Snippet animations: instead of class instances with a `$target` element which can be `start` and `stop`, these are now standard widgets which can be `start` and `destroy`. `this.$target` is an alias to `this.$el` for ease of compatibility. - Snippet editors: instead of class instances in charge of an editor overlay, these are now widgets. Each "child" snippet editor is properly attached as a "child", which allows editors to communicate and to be properly destroyed. (-) root widgets and website navbar The frontend is different of the backend. In the backend, the page has an empty <body/> element and all the components are instantiated from parent to children (i.e. the `WebClient` is instantiated and is in charge of instantiating the `ControlPanel`, etc). The frontend cannot work like that on page loadings as they are way more frequent than in the backend and we do not want them to flicker. A frontend page is loaded as a <body/> element which already contains the website navbar and its menus and the whole content page. JS code has to be "attached" to these existing elements. This is possible thanks to the `RootWidget` instances and the specialized `WebsiteRoot`, `IframeRoot` and `WebsiteNavbar` (see code for details). (-) lazy loading No more (or at least a lot less) XML/JS has to be loaded on page loading, thanks to the use of the `Widget.xmlDependencies` feature. XML which have to be lazy loaded is loaded only on related Widget instantiation if necessary, which allows to execute a lot of JS code before the DOM is ready and to start many widgets on DOM ready (not later). A visual benefit of this is clicking on the 'edit' button as soon as it is possible: before this commit, this was sometimes not doing anything as event handlers were not binded yet. Still a possible exception: loading the session and locales. This may be asynchronous stuff which is still required before widget instantiations but this will be the subject of another task. (-) deprecated code and code location More than reviewing code and organizing it, many apparent dead code was removed. More importantly, mislocated code was put in the right app. This is the case for snippet animations which is a concept for website apps but was defined in the web_editor app, or some translation concepts which were part of website but should have been part of web_editor. --- There are probably more things to say about this commit but I will let the comments speak for those.
2017-06-30[ADD] website_rating: generic rating management on chatter frontendJérome Maes
Extend new dynamic chatter to manage rating when posting comment. The model should inherit of rating.mixin and its frontend chatter should allow rating to enjoy star widget and rating card. This is more generic : stats, rating, ... are manage in one place (this module) for all document.
2017-06-30[IMP] website_mail: make the frontend chatter lazyJérome Maes
Message are now fetched and display using javascript to optimize performance. Also the chatter is completely rewrite : add pager, filter possiblity, ... This commit is mainly technical: posting feature does not change. Only the display with pager is new. The goal is also to prepare frontend chatter for a better integration with rating widget. The mail.thread mixin is extended to manage the field website_message_ids (display all messages that can be seen on frontend by user (employee or not). When fetching or posting message, a check is done to see if we need to do it as sudo(). website_mail implement posting messages with token or sha_in (using in website_quote). The same verification is now done when fetching messages, via '_special_access_object' method.
2016-06-17[REF] web, *: move QWeb odoo init to web.QWebGéry Debongnie
this js module centralizes all odoo initialization
2016-04-13[MIG] website_mail: code migration to new apiKeyur Gajjar
No functional changes, only rewrite the code with the api.v8 which more pythonic and smooth.
2015-09-25Revert "[FIX] website_mail, website_sale : redirect to login page to post ↵Jérome Maes
comment" This reverts commit 7974bf54411f189d1d52da90beae95da51d90dd0.
2015-09-23[FIX] website_mail, website_sale : redirect to login page to post commentJérome Maes
Add 'force_display' param for the frontend chatter to allow public user to see the textarea. When submitting his comment, he will be redirect to login page (like it was before generic chatter) in both mode (json and post mode). This required changing the error handeling of json mode : when a login is required, the user switch to post mode to allow http redirect, keeping its submitted params (rating, comment, ...).
2015-09-18[FIX] website_mail : css author avatar class, make the same in js and qweb ↵Jérome Maes
template
2015-08-27[IMP] website_mail : widgetize the Frontend Chatter. Prepare to include ↵Jérome Maes
rating feature with posting mail.message
2015-08-07[IMP] website_mail: generic chatter implementationDamien Bouvy
A new generic chatter template is available in website_mail This template allows access rights escalation when some kind of token or uuid is available on the model or if you use the object_shasign function in the main controller of website_maill to generate a cryptographic signature to allow commenting on any object. To use this chatter, you need to make a t-call to website_maill.thread in your template after having set the following variables: - chatter_object: the browserecord of the mail_thread object (mandatory) - token: if you use a token system (optional) - token_field: name of the field that stores the token on your object (optional) - sha_in: if you use a shasign to allow public comment (optional) - nosubscribe: set False if you want the partner to be set as follower of the object (optional) - message_type, subtype: see message_post in mail_thread.py
2015-07-10[IMP] mass_mailing: move code from website_mail to mass_mailing and use ↵Christophe Matthieu
web_editor
2015-07-10[IMP] web_editor: adapt css, js and xml to use web_editorChristophe Matthieu
2015-04-17[MERGE] forward port of branch saas-6 up to e941c0fChristophe Simonis
2015-03-27[FIX] website_mail: remove unused alert div, fixes look of input-group-btnOlivier Dony
Bootstrap's CSS depends on the input-group-btn element being the first/last child of its parent. This was not the case because of the invisible and useless alert.
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] website_mail: update to the new module systemGéry Debongnie
2015-03-06[FIX] website: backend editor don't display the default value and don't exit ↵Christophe Matthieu
the fullscreen mode when click on escape
2015-02-12[IMP] website_mail: improved template designer, added support for background ↵Christophe Matthieu
color, font color and convert class to inline style in mail designer, changed snippet according to new format, added theme selector in mail_designer, added font-awesome support (convert in image) in mail snippets
2015-01-05[IMP] website: use the new summernote editorChristophe Matthieu
2014-10-24[MERGE] forward port of branch 8.0 up to 92183e5Christophe Simonis
2014-10-24[FIX] website_mail: connected users can't follow a website documentChristophe Matthieu
2014-10-06[FIX] website_mail: "save and continue" buttonAjay Patel
2014-09-17[FIX] Bundlification remains (Fixes #2463)Fabien Meghazi
2014-07-23[MERGE] forward port of branch saas-4 up to ↵Denis Ledoux
5739aebfb1711bb94c2f94bfb03ec12f17e9430d
2014-07-16[FIX] mail, website_mail: specific mailing-list footer + better unsubscribe ↵Olivier Dony
option - remove the default footer for mail.group messages, replace with specific footer with archive and unsubscribe link - remove the automatic addition of user signature in mail.group messages, as many of them will be posted via the mail gateway and already contain a user signature. - make it easier to unsubscribe even when not logged in, as followers who have not signed up will have no way to login short of signing up. - remove tests looking for user signature in mail.group posts
2014-06-19[MERGE] forward port of branch saas-4 up to 5087612Christophe Simonis
2014-06-19[FIX] website_mail: restored follow JS code that was wrongly merged with the ↵Thibault Delavallée
mail group follow snippet. Now both widget animation exists, the second being more complex and therefore requiring a different animation.
2014-06-03[FIX] website_mail: fixed template choice and body duplication in the email ↵Thibault Delavallée
designer that was buddy; added some css to the page to make it more look like an email designer; also added a demo data for a template for mass mailing contacts in mass_mailing module.
2014-05-30[FIX] bunch of changes lost in incorrect merge ↵Xavier Morel
f4d78ae738e474abd4e77dc8fc6cdf8a668a5d72
2014-05-30[REV] attempt to revert incorrect removals in ↵Xavier Morel
f4d78ae738e474abd4e77dc8fc6cdf8a668a5d72
2014-05-28[MERGE] Forward-port saas-4 up to bf135adOlivier Dony
2014-05-28[FIX] website_mail, websit_mail_group: moved discussion group snippet to the ↵Thibault Delavallée
right module; it should not be available when the mailing list archives module is not installed. Also fixed get_alias_info route to be mail_group specific and to avoid allowing people to browse the database.
2014-05-28[FIX] website_mail: fixed is_follower controller, that could leak data about ↵Thibault Delavallée
records. Added instead a controller to get alias data. This controller is called by the discussion group snippet to have the info about the alias.
2014-05-27[MERGE] Forward-port of latest saas-4 fixes, up to 0452851Olivier Dony
2014-05-27Revert "Merge pull request #225 from odoo-dev/master-frontend-assets"Fabien Meghazi
This reverts commit dd900408ded4ece90df5f80f36daa049bc8f0e5b, reversing changes made to 4da882d48ffd09651b66e72a6e5c87e76d05a346.