Commit Graph
1198 Commits
Author SHA1 Message Date
Christophe Simonis f02ed9ab9a [MERGE] forward port branch saas-16 up to 0af13af5de 2018-01-02 16:54:38 +01:00
Christophe Simonis 0af13af5de [MERGE] forward port branch saas-15 up to ddd293065e 2018-01-02 15:36:25 +01:00
Christophe Simonis ddd293065e [MERGE] forward port branch saas-14 up to ba2a83ddfa 2018-01-02 15:02:26 +01:00
Christophe Simonis ba2a83ddfa [MERGE] forward port branch 10.0 up to e336dc38ca 2018-01-02 13:56:49 +01:00
Odoo Translation Bot 62aa3be24c [I18N] Update translation terms from Transifex 2018-01-01 02:40:01 +01:00
Odoo Translation Bot f60948d55c [I18N] Update translation terms from Transifex 2017-12-31 04:14:26 +01:00
Odoo Translation Bot 9d9ca960ae [I18N] Update translation terms from Transifex 2017-12-24 04:16:18 +01:00
Martin Trigaux d8f1935068 [I18N] fetch missing languages
Some new languages were skipped and had no files.
Import all files for all languages
2017-12-20 13:02:37 +01:00
Martin Trigaux 4af12acc80 [I18N] es_ cleaning translations
The regional variations are not published on Transifex and hsould be translated
manually.

The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).

Clean based on the .pot and delete the empty files

Fixes #21733
2017-12-19 16:22:17 +01:00
Christophe Matthieu fdf0f014bf [FIX] web: avoid race condition in the website
Depending on the speed of the runbot, errors may appear if one tries to
use a template that is not yet loaded. Templates are being
loaded and we add new template to read, the ready function does not
take into account new additions.
2017-12-19 13:35:36 +01:00
Christophe Matthieu 7dfdfa0103 [FIX] web_editor: Avoid twice translated for static xml
Avoid texts to be translated twice if some modules have the translated
value corresponding to the English source term.

To reproduce: create a translation for static xml (comment 'openerp-web')
with 'Modifier' translated by 'Tadaaa'. In french context, the 'Edit'
button in forms is translated by 'Tadaaa'.

Don't translate template in web_editor if we are in the backend because
the translations of all the modules have already been loaded and applied.
2017-12-19 13:35:36 +01:00
qsm-odoo b1b13dbeed [FIX] web_editor: revert copy/paste feature of the editor
The feature was introduced and fixed by following commits:
- https://github.com/odoo/odoo/commit/906875fc78cb80f6c3d5f1f14f997008cd406473
- https://github.com/odoo/odoo/commit/76be5eed449c78eaf0b4208c381169132492ab4a
- https://github.com/odoo/odoo/commit/7401807510a103374fa8eb524ae5a5698ae21a39

The feature is however still buggy in lots of cases as it is a bad
heuristic that cannot handle simple pasting cases. The feature was
initially introduced to allow pasting PDF content without having to
remove all the unwanted line breaks this induces. As this feature is
not that important and introduced more bugs than it solved, the feature
is deleted by this commit. If we want that feature again, maybe it is
worth considering an "Import from PDF" button or something like that.

See https://github.com/odoo/odoo/issues/15665
2017-12-18 16:10:33 +01:00
Alexandre Kühn 6632822d14 [FIX] web_editor: html field commitchanges fully loaded
Fix over this one: https://github.com/odoo/odoo/commit/cae188514fa8b0a7c785a630ac4aff677b2071fa

The intent was to disable buttons in form views until html fields are fully loaded,
but it was not disabling the buttons for the following reasons:

   1. It is looking for buttons in the DOM, although they
      are not already attached into the body at this moment.
   2. It was disabling the buttons only at widget start(),
      so only once after "Empty Cache and Hard Reload".

We propose a better solution than disabling the buttons in the control panel:
when we click on "Save", the html field ensures that it is fully loaded while commiting the changes.
2017-12-18 11:27:11 +01:00
qdp-odoo 78ae6f470b [MERGE] forward port branch 9.0 up to 9bba7fea42 2017-12-15 16:58:40 +01:00
qsm-odoo 69d4383d7b [FIX] web_editor: browser-unify alignment editor option
Summernote uses `document.execCommand` to apply most styles when
editing, leveraging the implementation to the browser.

Summernote is configured to use HTML styling (`'styleWithSpan': false`),
and in this case, browsers such as Firefox use HTML attributes for
styling text align, while Chrome still uses CSS for that. In fact,
`document.execCommand` is browser-inconsistent... but so is the
`styleWithSpan` option. Indeed, setting the option to `true` will make
Firefox use CSS property for alignment too... but not Internet Explorer.
So we might consider changing this option's value but this would not
solve the current problem.

Indeed, any CSS `text-align` style in Firefox takes precedence above
the element's `align` attribute, so when users were trying to align text
on stuff that was pre-aligned, they were unable to do so.

We can better explain the situation with this example:
A user tries to left-align in Firefox a `p.text-center` element, and
produces this:

```html
<p class="text-center" align="left"/>
```

(`align` attribute is ignored because of the `text-center` class)

On Chrome, this would be produced with the same steps:

```html
<p class="text-center" style="text-align:left"/>
```

With this patch, we actually make that HTML look like expected by the
user, no matter the browser he's using, by forcing the editor to use
the text-align CSS property. Note that the implementation is quite
ugly but had to take care of compatibility.

See https://github.com/odoo/odoo/pull/20900
(thanks to @Yajo for original PR)
2017-12-15 14:06:04 +01:00
Christophe Simonis b37cc1f9b7 [MERGE] forward port branch saas-16 up to a2ea4ba095 2017-12-12 18:39:43 +01:00
Christophe Simonis 0fd602ba34 [MERGE] forward port branch saas-15 up to 791e0cf47a 2017-12-11 09:17:53 +01:00
Christophe Simonis 791e0cf47a [MERGE] forward port branch saas-14 up to 9bd8a49820 2017-12-08 16:18:44 +01:00
Christophe Simonis 0fda9fba0b [MERGE] forward port branch 10.0 up to cd31e82689 2017-12-07 17:38:40 +01:00
jat-odoo 0a90393da3 [FIX] web_editor: show proper video on existing video edition
See https://github.com/odoo/odoo/commit/5e38bef5a5ededb28707af44a19caaec2af2d682
and especially https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71

Closes #19673
2017-12-06 15:16:46 +01:00
Christophe Simonis f96a797fe6 [MERGE] forward port branch saas-16 up to b8540eefe3 2017-12-06 11:59:38 +01:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Christophe Simonis a447da75fd [MERGE] forward port branch saas-14 up to e7d174a142 2017-12-04 19:25:51 +01:00
Christophe Simonis 426e269c22 [MERGE] forward port branch 10.0 up to 067a241ea8 2017-12-04 16:24:24 +01:00
Géry Debongnie e6146db88a [FIX] web_editor: make sure html editor does not ignore changes
For some reason, Summernote does not trigger a change event in some
cases.  It looks like it happens in 'codeview' mode, and when the change
in question is only a backspace key event.  Maybe it listen for keypress
and backspace do not trigger keypress event.

In any cases, the situation is that it is not easy to clear an html
field: going in edit mode, then selecting the content and pressing
backspace will not work before this commit.

With this commit, we specifically compare the value in the editor with
the current value to determine if the field is dirty.
2017-12-04 16:03:37 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
Adrien Dieudonne e15e6fe32e [FIX] web_editor: support of SVG elements in snippets
Before this commit, it was not possible to save a page
containing a snippet with a SVG tag.

To support SVG elements, we need to use 'Element.getAttribute'
and 'Element.setAttribute' as mentionned in the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/Element/className

For more information, see GH-14485
2017-12-04 09:24:35 +01:00
Odoo Translation Bot 19fda52a53 [I18N] Update translation terms from Transifex 2017-12-01 02:53:01 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00
Christophe Simonis 7754538750 [MERGE] forward port branch 9.0 up to cae188514f 2017-11-28 12:08:34 +01:00
Lucas Perais (lpe) cae188514f [FIX] web_editor: Fieldtexthtml wait until iframe loaded to save
In the case where:
- you are too fast editing a mass mailing, trigger an onchange (e.g. mailing_model) and then save
You can use the edit/save shortcuts to make yourself believe you are Flash Gordon
- your internet is too slow (Down: 4Mb/s, Up: 500kb/s, Latency: 20ms)

Before ths commit, the onchange will return *before* the field (the iframe actually) is loaded.
This onchange contains a signal *in* the body_html of the field to allow communication with the iframe.
If you save before the iframe is loaded, this body_html keyword will be saved.

After this commit we deactivate the save button until the iframe is loaded.
We could have gone for a python user error on the value of the body_html too.
But it would have added a supplementary click and potential reloading

OPW 783616
2017-11-28 11:22:30 +01:00
Odoo Translation Bot 31e574b153 [I18N] Update translation terms from Transifex 2017-11-26 04:25:05 +01:00
Christophe Simonis f0a1bc81eb [MERGE] forward port branch 10.0 up to f4a54d7f66 2017-11-20 18:56:01 +01:00
qsm-odoo dc679308d6 [FIX] web_editor: highlight selected fa icon on media dialog start
When editing a fa icon in the editor, the current fa icon was not
properly selected anymore.

Note: the code is still to be improved to handle all cases but this
will be done in master.
2017-11-20 10:38:45 +01:00
Odoo Translation Bot 08bdd06542 [I18N] Update translation terms from Transifex 2017-11-19 04:26:17 +01:00
Nicolas Lempereur ca3390fd05 [FIX] web_editor: forward-port typo on click
event variable has been renamed to ev in 11.0 and the code was
duplicated.
2017-11-17 14:13:58 +01:00
Christophe Simonis a094f6318b [MERGE] forward port branch saas-16 up to 745d00362a 2017-11-16 12:40:36 +01:00
qsm-odoo 4e32a23d96 [FIX] web_editor: restore selected images display
In the media dialog, when an image is selected, it has a colored border
to indicate it. Commit https://github.com/odoo/odoo/commit/e011d58bee140411ccfb1ef9115dddc090d573c3
made changes, part of them designed to "Improve the image dialog to be
able to select/unselect". While this commit was indeed doing that, it
was also breaking stuff: when selecting image(s) then performing a
search, the colored border disappeared while the images were in fact
still selected.

Fortunately, this stuff breaking is only due to code modification that
was made for no reason (so reverting part of the commit is enough to
restore the features while keeping the commit's improvements).
2017-11-15 10:59:49 +01:00
Odoo Translation Bot 48e8282130 [I18N] Update translation terms from Transifex 2017-11-12 04:24:48 +01:00
Lucas Perais (lpe) 1a253d3ae2 [FIX] web_editor: mediaDialog should trigger change
before this event, when editing an email template from the chatter
by adding an image through the mediaDialog, the message was always empty
if nothing more than the image was present.
this was because the html field was not marked as dirty,
the event responsible for the marking was not triggered.

After this commit, when sending solely an image from the media dialog,
the email sent does contain the image

opw 779167

closes #20817
2017-11-10 10:30:34 +01:00
Aaron Bohy 9bc5009481 [FIX] web(_editor): enable mobile tests
This rev. introduces a new test suite meant to test the webclient
components on mobile devices. The key 'config.device.isMobile' is
forced to true in this test suite, so that mobile specific JS files
are properly executed, which isn't the case in the classic JS test
suite (setting isMobile to true in the test definition is too late,
as the JS files are already processed).

For now, this new test suite contains a single test, which was
skipped until this rev. as it couldn't be executed in the classical
JS test suite.

Both suites are executed at each build of the runbot, and they
can be manually executed from the webclient as well (via the debug
manager).
2017-11-10 10:24:42 +01:00
qsm-odoo c7171795f8 [FIX] web_editor: restore snippet option data parameter
Snippet options were not receiving proper data parameter on
instantiantion due to a websitepocalypse wrong adaptation. Those
data are parameters to tweak an option behavior, directly defined
on the option's <div/> in the XML. By mistake, they were now taken
on the child <li/> element (main DOM element of the option).

A visual example of the bug is the overlay colorpicker displaying
"Background Color" as a title instead of "Overlay Color".
2017-11-08 18:28:48 +01:00
Odoo Translation Bot 43e5f5a67f [I18N] Update translation terms from Transifex 2017-11-08 11:08:53 +01:00
Christophe Simonis 45958ab312 [MERGE] forward port branch saas-16 up to 5f9c3f51a8 2017-11-07 11:45:42 +01:00
Odoo Translation Bot 11a8728c74 [I18N] Update translation terms from Transifex 2017-11-05 04:37:27 +01:00
Odoo Translation Bot 6c1c1f6e9e [I18N] Update translation terms from Transifex 2017-11-05 01:11:44 +01:00
Christophe Simonis 5fa577a14d [MERGE] forward port branch saas-15 up to 8ec60550a7 2017-11-03 13:36:41 +01:00