Commit Graph
484 Commits
Author SHA1 Message Date
Jeremy Kersten f0463a3e1d [IMP] web_editor, website, website_sale: add zoom option for t-field image
web_editor Qweb: Add 'zoom' option for widget image
    <span t-field="product.image_small" t-options="{'widget': 'image', 'zoom': 'image_medium'}" />

website: Add Zoom code to be standard for all website module

website_sale: add zoom on Main product image
2016-09-21 21:29:18 +02:00
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
Christophe Simonis f8a601cad7 [MERGE] forward port branch saas-10 up to e634a52 2016-09-15 18:55:01 +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 19b4f5efe4 [MERGE] forward port branch saas-10 up to fa7430c 2016-09-14 11:58:45 +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
Martin Trigaux fb74fec3f5 [I18N] export 10.0 source terms 2016-09-07 11:08:42 +02:00
Martin Trigaux 05d91ea4e9 [I18N] update saas-11 translations by merging 9.0 and master
Without fuzzy-matching that is too flexible and error prone.
Was matching on wrong source and got translation without '%s'
2016-09-07 09:40:37 +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
Martin Trigaux 6e61ea2256 [I18N] update saas-12 translations by merging 9.0 and master
Without fuzzy-matching that is too flexible and error prone.
Was matching on wrong source and got translation without '%s'
2016-09-06 10:03:09 +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
Martin Trigaux e37d0909a2 [I18N] export master source terms
Since the externalidpocalypse
2016-09-05 16:33:43 +02:00
Olivier Dony 859d443863 [IMP] *: rename manifest files for v10 naming convention 2016-09-05 11:57:50 +02:00
Martin Trigaux 3efa9d39c6 [I18N] Update translation terms from Transifex 2016-09-05 11:34:17 +02:00
Odoo Translation Bot 9f0d3800cc [I18N] Update translation terms from Transifex 2016-09-04 00:36:28 +02: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
Christophe Simonis 54e5bbdf35 [MERGE] forward port branch saas-10 up to 897b9b8 2016-09-02 16:28:28 +02:00
Christophe Matthieu cdaee93f7f [FIX] web_editor: odoo.define can be undefined if not in edit mode
Commit 933949085d added the odoo variable
definition in the iframe template so the condition which checked if
odoo.define is available had to be adapted.
2016-09-02 11:27:29 +01: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
Raphael Collet 70dec2d896 [REF] registry: now mapping model name to model class 2016-08-31 17:21:59 +02:00
Raphael Collet 75dc39e042 [REF] openerp.http: make request.context consistent with request.env.context 2016-08-31 17:21:58 +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