Commit Graph
282 Commits
Author SHA1 Message Date
qsm-odoo b51e8a8a03 [FIX] mass_mailing, *: allow to auto select default text of templates
* + web_editor

The feature was only activated in the web_editor in snippet contents
(before they are dropped in the page). Now, on first theme selection,
the feature is activated in the template content.
2016-09-21 13:16:59 +02:00
qsm-odoo 745d1e3328 [FIX] web_editor: adapt code which updates editor bar after image edition
This fixes a bug where the media dialog reopened after closing after
edition of a t-field="image_small" block.
2016-09-20 14:06:29 +02:00
qsm-odoo 4868b045a7 [FIX] web_editor: remove breaking cache of transcoder
The web_editor transcoder, who is in charge to change mail css style
into inline style and vice versa, has a cache to improve its
efficiency. The problem is that it was designed to work only if a
particular "<tag>.className" has always the same css style no matter
what its parent or neighbors are. This is obviously not compatible
with theme switching. Indeed, only by switching from one theme to
another, the parent of every snippet have a different className which
is used in css to design differently every snippet. Also inside a same
theme, we obviously want to be able to style a particuler .myClass
element differently from one snippet to another without having to
multiple css classes.

This commit removes the cache system to allow theme switching and
liberty in theme designing. This however make the edition start and
the saving really slower...
2016-09-20 13:52:29 +02:00
qsm-odoo 9749b93250 [IMP] website, web_editor, mass_mailing: move margin and size options
website -> web_editor so that they are available for mass_mailing.

To allow setting margins on td elements:

As the above mentionned option allows to control the mt and mb classes
on the mass mailing items, the problem is that we would ideally want it
to be functionnal on td element as they are the main part of a mail.
As they don't support margins, there were many options to fix the
problem:
- Add more JS to place the mt and mb classes on children of td element
- Place the option on children of td element and not td element itself
but in that case, the width control of td would imply a lot of parent
option hierarchy, or the width control had also to be adapted to control
children
- Control padding instead of margin. This forces to add lots of
css rules like pt4 pt8, ... (or td.mt4, td.mt8, ...).

The last solution has been chosen. Padding is more supported than
margins in mail client anyway and the css rules will be isolated in
the mail editor anyway. Using td.mt4 instead of pt4 had the advantage
to not require any JS modification.
2016-09-20 13:52:29 +02:00
stefanorigano 4f93d5c687 [IMP] mass_mailing, web_editor: improve themes/snippets/templates 2016-09-20 13:52:29 +02:00
qsm-odoo fe0478a5c4 [FIX] web_editor: remove dead code and refactore show_blocks method
Following commit e634a52cac, the
show_blocks method had to be refactored to remove the dead code and
refactore the old one it contained.
2016-09-16 17:02:33 +02:00
Christophe Simonis f4fc3985b6 [MERGE] forward port branch saas-12 up to 10cde43 2016-09-16 11:03:50 +02:00
Christophe Simonis 10cde43fd4 [MERGE] forward port branch saas-11 up to 4c2b536 2016-09-16 10:34:39 +02:00
qsm-odoo e634a52cac [FIX] web_editor: mark snippets which can't be dropped in the page
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).

As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
2016-09-15 16:47:15 +02:00
Christophe Simonis 784eaf28dc [MERGE] forward port branch 9.0 up to 6647e1f 2016-09-15 16:45:13 +02:00
qsm-odoo 5e6df42800 [FIX] web_editor: use valid bootstrap for m2o editor options
The .dropdown is in a .btn-group environment while a .btn-group can
only contain .btn or .btn-group elements.

This induced problems where the m2o options covers the full overlay
environment, preventing clicks on the customize dropdown.
2016-09-15 15:43:32 +02:00
qsm-odoo cd244a40f3 [FIX] website, web_editor: remove born-dead code
This code was introduced in 8.0 and has never been called.
2016-09-15 14:12:50 +02:00
Christophe Simonis 25f271c099 [MERGE] forward port branch saas-12 up to 13765b5 2016-09-14 12:39:12 +02:00
Christophe Simonis 13765b59c3 [MERGE] forward port branch saas-11 up to 19b4f5e 2016-09-14 12:06:31 +02:00
Christophe Simonis fa7430c157 [MERGE] forward port branch 9.0 up to 5be4086 2016-09-14 11:56:05 +02:00
qsm-odoo ad930d5208 [FIX] web_editor, website: review responsiveness/style of ace editor 2016-09-13 14:43:50 +02:00
qsm-odoo 142b177c5c [IMP] web_editor: select default text on click instead of mouseup
When a snippet contains two p elements, they will both get the
"o_default_snippet_text" when placed in the page. The individual p are
then automatically selected on mouseup event. This induces strange
behavior when trying to select the two paragraph together ; indeed
only the paragraph on which you mouseup will be selected.
2016-09-13 14:25:41 +02:00
qsm-odoo 965d5a42fd [FIX] web_editor: allow to drop a snippet where its movement began
Before this commit, if we dragged a snippet and dropped it where we
began the drag, the snippet was removed.
2016-09-13 13:18:17 +02:00
qsm-odoo 5e9ebcfb01 [FIX] web_editor: properly call on_remove method of snippet options
The snippet options can define an on_remove method which was supposed
to be called when the snippet is removed. This was not the case since
the method was written so that the options were removed before the
on_remove method was called... (Un)fortunately, the on_remove callbacks
were not doing any critical job in current implementation. In saas-13
however, some elements will rely on this.
2016-09-12 15:35:16 +02:00
Christophe Simonis 298e2032ea [MERGE] forward port branch saas-12 up to 9f28139 2016-09-09 18:13:31 +02:00
stefanorigano e1022f38a3 [IMP] web_editor, website: add colorpicker palettes customizations
* Add the ability to define palettes custom selection.
* Add the ability to define a custom title for the colorpicker dropdown
* Define a custom layout for single (unique) palette layout

* Define overlay color options based on new colopicker for
Cover and Banner text containers

* Define default palettes
2016-09-07 13:00:01 +02:00
stefanorigano 5b8c93f073 [IMP] web_editor: change design of transparent colors palette
* Add a "transparent" button
* Add a special background for transparent background buttons

+ Some minor colorpicker design change
2016-09-07 12:58:50 +02:00
qsm-odoo fa3f529d80 [FIX] web_editor: stop resetting bg image of parent snippet on color change
Commit 404ed0f788 tried to solve the
problem but only solved a part of it. Indeed, if the snippet child
has a bg color option but not a bg image option, the event propagation
stops in the parent handler, when it is too late.

Solution is checking that the event comes from the same element on
which the callback is attached to.
2016-09-06 13:00:56 +02:00
qsm-odoo 61e48b09fb [REF] mass_mailing: convert templates to themes and clean code
* Remove mass mailing template switching system (lemon, airmail, ...)
and replace it with a theme selector which only toggle a different
class on the body.
* Lint JS files.
* Change the way the editor is overridden by mass_mailing in a more
odoo way (put the JS in assets and check on runtime if it must be
applied.

+ fix editor style
+ remove useless code
+ remove odoo template
2016-09-05 17:07:31 +01:00
Csaba Fazekas 9676ceec02 [REF] mass_mailing: change/add snippets/themes layout/design
* Airmail/Lemon/Tech template/Odoo template
* Add bg color option
* Clean snippets
2016-09-05 17:01:50 +01:00
Christophe Matthieu 1501b30c53 [REF] mass_mailing: change theme/template selection and add new snippets
* remove theme/template selection screen for mass_mailing
* allow to use different layout on edition
* add new snippets
2016-09-05 17:00:45 +01:00
Christophe Matthieu ea8f29e260 [FIX] web_editor: debug mode is not applied in the iframe of html field 2016-09-05 17:00:33 +01:00
Christophe Matthieu 0cca5651a5 [FIX] web_editor: saved mass_mailing have small difference with edition 2016-09-05 17:00:09 +01:00
Christophe Matthieu 8fc60d3509 [FIX] web_editor: display fullscreen button in readonly mode 2016-09-05 17:00:02 +01:00
Christophe Simonis 1a77d9d02a [MERGE] forward port branch saas-12 up to 476cb5a0 2016-09-03 23:57:57 +02:00
Christophe Simonis 55d2e4b7cf [MERGE] forward port branch saas-11 up to bde7f88 2016-09-02 17:23:34 +02:00
qsm-odoo c227b8fd88 [FIX] web_editor: remove some defaults in text edition
* On firefox, you had to click twice on a link to be able to start
typing text
* When selecting text which contained a <br/>, you were not able to
replacing it correctly (you had to click again before starting typing)
* When replacing a whole paragraph content which was below a title,
the text was not replaced and you had to click again and the title
transformed into a paragraph.
* ...
2016-09-02 10:04:58 +01:00
qsm-odoo 8c0c308eca [FIX] web_editor: correct return value of saveElement 2016-09-02 10:04:58 +01:00
qsm-odoo 5a71cc6bdc [REF] web_editor: lint and simplify JS code 2016-09-02 10:04:57 +01:00
Martin Geubelle e59a7fe3ff [REF] web_editor, website: move ACE editor to web_editor 2016-09-01 17:15:01 +02:00
stefanorigano 8c035a7a41 [IMP] web_editor: add transparent grayscale color palette
These colors were usually hardcoded in some snippets (.s_banner for
example) to increase text legibility over background images.

This commit will let the user personalize them.
2016-08-31 16:37:20 +02:00
stefanorigano 1634cad46c [REF] web_editor: editor UI style and stability improvements
* Review style of some UI components
* Rename some content
* Define a font-family less variable to be used to avoid that themes
customizations affect the UI. Note: theme should ideally not redefine
the font family of the body but of the #wrapwrap element but this is
done for safety.
* Overwrite other theme's customisations
* Minor style fixes
2016-08-31 16:37:20 +02:00
qsm-odoo 4d68d779dc [IMP] web_editor: force web_editor overlay option buttons to stay on one line
Before this commit, when the snippet was too narrow, the buttons broke
over multiple lines.
2016-08-31 16:37:20 +02:00
qsm-odoo d6f30345a3 [IMP] web_editor,website: rename "background image options" option
"Background Image Options" -> "Background Image Sizing"
2016-08-31 16:37:20 +02:00
qsm-odoo a7f7efac4c [IMP] web_editor: improve usability to select image in media dialog
Before this commit, we had to click on the image we want, then click
on save in the modal footer. Now we can also double click on the image
we want, with the same result.

Same goes for icons.
2016-08-31 16:37:20 +02:00
qsm-odoo 0659d94d7f [IMP] web_editor: open link dialog on double click on a link
(Also refactore the code so that the implementation is the same for
the media dialog opening on double click on an image).
2016-08-31 16:37:20 +02:00
qsm-odoo 323c949ec4 [IMP] web_editor: lint file rte.summernote.js 2016-08-31 16:37:20 +02:00
qsm-odoo 0305de1929 [IMP] web_editor: change tooltip for parent button in editor
"Select Container Block" -> "Select Parent Container"
2016-08-31 16:37:20 +02:00
qsm-odoo 404ed0f788 [FIX] web_editor: do not propagate event communication between
background and color snippet options

The background and color snippet options communicate so that if a
color is set while a background is already set, the backgrond is
removed. The problem is that the event propagation was not stop
so if a snippet had a background and one of its child set a color,
the background was removed.
2016-08-31 15:28:15 +02:00
Christophe Matthieu 0f8f68dfa7 [IMP] web_editor: convert tours to use web_tour.tour 2016-08-30 13:54:28 +02:00
qsm-odoo c69f306b5d [FIX] web_editor: correctly display image and focus point in bg option dialog
Before this commit, the focus point the user can move on the image in
the background position configuration dialog was only following the
mouse as we want if the image original width was larger than the dialog
one. This is because the javascript relies on the fact the image takes
100% width of its container. To fix this, the container now does not
take 100% of modal width but the size of its internal image (with a
max-width of 100%).
2016-08-30 10:04:14 +02:00
qsm-odoo 88d8a2ca8e [FIX] web_editor: hide header in customize dropdown when it has no content
In some snippets, the parent hierarchy has many elements. So, when
selecting a deep child of one of those, the customize dropdown had
many dropdown headers showing the parent hierarchy but without any
option for many of them.

Commit de0d9fd666 already fixed the case
where the dropdown only contains dropdown headers. This commit is an
adaptation to hide these headers one by one.
2016-08-29 18:50:51 +02:00
qsm-odoo ca01e7d7c5 [FIX] web_editor: change margin and resize handle icons on focus
The feature was lost because of a programmation error (use of this in
a non-binded function).
2016-08-29 18:50:51 +02:00
Christophe Simonis f4738e7bb5 [MERGE] forward port branch saas-12 up to 78e9c7f 2016-08-26 18:06:17 +02:00
Christophe Simonis de0d503421 [MERGE] forward port branch saas-11 up to f0c8224 2016-08-26 16:59:45 +02:00