Commit Graph
232 Commits
Author SHA1 Message Date
Simon Lejeune c79ba8f785 [FIX] web_editor: test ui should be in post install
This test is ran in the backend and, if we do not mark it as post
install, the dependencies of the web module are not installed.
The webclient will then errors like "View type 'kanban' is not present
in the view registry".
2016-08-09 14:39:20 +02:00
Odoo Translation Bot 8a3a620404 [I18N] Update translation terms from Transifex 2016-08-07 00:38:49 +02:00
Yajo 4b4bc68815 [FIX] web_editor: broken JS/jQuery helper
A jQuery element is not callable.
2016-08-01 10:02:45 +02:00
Odoo Translation Bot b7eb3c6bd0 [I18N] Update translation terms from Transifex 2016-07-31 00:38:56 +02:00
Odoo Translation Bot 6dcaffa3e0 [I18N] Update translation terms from Transifex 2016-07-24 00:30:28 +02:00
qsm-odoo f0620a9648 [FIX] web_editor,website: allow creating pages from edit menu
The code for page creation from menu edition dialog was there but
invisible to the user because of a wrong qweb template inheritance.
Indeed, the edit menu dialog relies on an extension of the link dialog
template. But this one is extended in-place in another location and
that extension is not considered when the second extension is made
because a t-extend always use the base template. The only solution to
achieve the same result is to copy the edit menu dialog qweb extension
in Javascript.

Note: the feature was still available from the link dialog in page
edition though because this was not concerned by the wrong qweb
extension.

However, adding a page by this way would create multiple pages because
one was created each time a page name was entered (and not only on
save !). So typing "test", then changing its mind and typing "hello",
then rechanging to "test", then hitting the save button created the
"test, "test-1", "test-2" and "hello" pages.
This fix takes advantage of an already present parameter which can
determine if a new page should be created or not. However, a code
refactoring should be done in master for these classes.
2016-07-20 15:59:53 +02:00
Odoo Translation Bot 691949c4b8 [I18N] Update translation terms from Transifex 2016-07-17 00:30:21 +02:00
Odoo Translation Bot 5a73ff2f1f [I18N] Update translation terms from Transifex 2016-07-10 00:30:32 +02:00
Odoo Translation Bot e349692ede [I18N] Update translation terms from Transifex 2016-07-03 00:32:09 +02:00
Yannick Tivisse 2f020dc8b9 [IMP] Remove 'author' field in __openerp__.py files to user default value 2016-06-30 13:27:46 +02:00
Odoo Translation Bot 765b3fc6ac [I18N] Update translation terms from Transifex 2016-06-26 00:29:54 +02:00
Christophe Matthieu 025263d3bf Revert "[FIX] web_editor: test jinja content to load editor in codeview"
This reverts commit f38f8930f0.

Revert for internal choice. Odoo want to use qweb in template and remove jinja support on next version.
If users want to use jinja they can change the view to use text widget instead of html widget.
2016-06-23 11:45:17 +02:00
Odoo Translation Bot d14efd562b [I18N] Update translation terms from Transifex 2016-06-22 21:14:56 +02:00
Christophe Matthieu f38f8930f0 [FIX] web_editor: test jinja content to load editor in codeview
The preview change the content because the browser try to fix the dom.
If a user use jinja and activate the preview, the jinja code is (re)moved by the browser and broke the template.
2016-06-22 14:26:42 +02:00
Odoo Translation Bot 596398a759 [I18N] Update translation terms from Transifex 2016-06-12 00:39:18 +02:00
Odoo Translation Bot d1fa3350bb [I18N] Update translation terms from Transifex 2016-06-05 00:30:55 +02:00
Odoo Translation Bot be91fa4c63 [I18N] Update translation terms from Transifex 2016-05-29 00:29:48 +02:00
Odoo Translation Bot ebc0206ab5 [I18N] Update translation terms from Transifex 2016-05-22 00:28:27 +02:00
Martin Trigaux 216d328a11 [FIX] web_editor: serialise translations of html_translate fields
The html_translate fields (e.g. website_descripton on product.product) were not
serialised and the raw value from the web_editor was saved as a translation.

This was an issue in case of special characters that may be present in the
translation. A translation containing non-breaking space was sent in html
(`foo bar`) while lxml converts such characters to unicode (`foo\xa0bar`).

When writing a translation, the value is checked against incorrect format using
```
value0 = field.translate(lambda term: None, record[fname])
value1 = field.translate({trans.src: trans.value}.get, value0)
value2 = field.translate({trans.value: trans.src}.get, value1)
if value2 != value0:
    raise ValidationError(_("Translation is not valid:\n%s") % trans.value)
```

As value1 is the unicode version of the translation and `trans.value` is the
html version of the translation, the last substitution in the callback method
was never made and the ValidationError was raised.

This commit forces the serialisation through lxml to be sure the compared
strings are using the same parser instead of comparing value from summernote and
lxml that may be both valid but still different.

opw-675767
2016-05-18 15:01:29 +02:00
Odoo Translation Bot 610d462740 [I18N] Update translation terms from Transifex 2016-05-15 00:29:02 +02:00
Jeremy Kersten 613ee31f9c [FIX] web_editor: video - allow to add video from unknown source
There are not cat... but you cannot know all the existing website in the world...
So, have faith in the user !

To do: allow to customize size or get it from iframe provided
2016-05-13 12:37:51 +02:00
Nicolas Lempereur 38e35cc442 [FIX] web_editor: scroll and editing menu modal
The class modal-open on body tag allow to scroll on the modal content
which is useful if the content is taller than the window viewport.

When closing the modal, this class is removed but there may be another
modal open on which we will not be able to scroll to view
buttons/content if too big.

This commit check if a modal is still opened after closing an editor
modal and in the affirmative add back the modal-open class.

opw-674475

note : was already present in 8.0 with ec47493, it is also present for
web.Dialog (but the modal of the editor do not inherit from web.Dialog)
2016-05-12 15:56:14 +02:00
Odoo Translation Bot 9cdc40e3ed [I18N] Update translation terms from Transifex 2016-05-08 00:28:57 +02:00
Martin Trigaux c89dc632fb [I18N] Update translation terms from Transifex
Had a timeout on last sync
2016-05-02 13:52:12 +02:00
Odoo Translation Bot da82207478 [I18N] Update translation terms from Transifex 2016-05-01 00:29:59 +02:00
Adrien Dieudonne 68ba897ce9 [FIX] web_editor: fix svg issue
className should return a string but svg node returns an object
2016-04-25 10:34:18 +02:00
Odoo Translation Bot c8cd67c5d9 [I18N] Update translation terms from Transifex 2016-04-24 00:30:00 +02:00
Raphael Collet 9fba75bd54 [FIX] web_editor: save translation values as HTML or XML fragment
The translation value is given as an HTML fragment.  It is converted to a valid
XML fragment if the translation's field requires it.
2016-04-21 16:14:34 +02:00
Christophe Simonis 7c04420802 [MERGE] forward port of branch saas-6 up to 7033a97 2016-04-19 12:48:58 +02:00
Odoo Translation Bot f4d79a2b8e [I18N] Update translation terms from Transifex 2016-04-17 00:31:25 +02:00
Odoo Translation Bot d4672389f7 [I18N] Update translation terms from Transifex 2016-04-10 00:32:08 +02:00
Nicolas Lempereur b21382bdd1 [FIX] web_editor: Cannot read property 'left' of undefined
This issue happen for example on a full runbot when clicking with
shift + key pressed on a sale order not in an editable.

We can see that initial_data.rect is only defined in mousedown when the
click target is inside an editable block, hence it could lead to an
issue otherwise.

closes #11527
2016-03-30 09:56:23 +02:00
Nicolas Lempereur 109c529c49 [IMP] web_editor: inline buttons shown over topbar
Before 9.0 web_editor separation in 8c55904, some style would make
inline button be visible over topbar.

This commit reintroduce that and also make the margin over the inline
editor content a little bigger (so the inline buttons on the top of a
content will cover a little less the topbar).

closes #11526
opw-671649
2016-03-30 09:54:05 +02:00
Odoo Translation Bot f02b8a76df [I18N] Update translation terms from Transifex 2016-03-27 00:32:16 +01:00
Nicolas Lempereur 85eda0c55f [FIX] web_editor: two editor and image bar buttons
Some image functionalities of the inline summernote would only take the
first of multiple editor into account when selecting the targeted image
of an image button action (image size, image padding, ...).

This commit select the appropriate editor given the current editable.

closes #11474
opw-668861
2016-03-25 11:39:57 +01:00
Odoo Translation Bot ef026d7cf2 [I18N] Update translation terms from Transifex 2016-03-20 00:32:37 +01:00
Christophe Matthieu feeac2a4f1 [FIX] web: various small issues in form view onchange/one2many
- Issue: Edit sale.order form view, add new line, change product who have
  taxes and click quickly on save (with slow network) => error message.
  Because some deferreds are lost.
- reduce number of reads and onchange for x2m widgets
- remove before_save method and use commit_value (the issue was that if the
  before_save and the change trigger an onchange, the onchange deferred is not
  checked before saving the content.
2016-03-14 10:14:16 +01:00
Odoo Translation Bot 41c94f6c77 [I18N] Update translation terms from Transifex 2016-03-13 00:33:15 +01:00
Christophe Matthieu 7ca31fdcde [FIX] web_editor: don't display the html content field
issue: message, click on a record, return to the list view, click on an other record => nothing desplayed.

opw-671047
2016-03-10 16:31:56 +01:00
Nicolas Lempereur 51641d2634 [FIX] web_editor: leave block after two enter
Before 3959afc the `node` tested would be the selection containing node,
but since then it may have been a `<br/>` which has some damaging
effects: now entering double enter at the end of a list, quote or code
block doesn't end this block.

Testing the use case corrected by 3959afc, the said change seems to have
no effect so this commit reverts it.

opw-667618
2016-03-09 16:01:49 +01:00
Odoo Translation Bot 7d3d9272bf [I18N] Update translation terms from Transifex 2016-03-06 00:33:40 +01:00
Christophe Matthieu bc4561b26b [FIX] web_editor: can't use mako/jija if remove space to prettify html
Addapt html method to prettify the html code and keep mako structures.

opw-668409
2016-03-03 15:41:02 +01:00
Nicolas Martinelli fad4788272 [FIX] web_editor: image size
Make sure to create an image of a size larger than zero. A size of zero
will generate a traceback.
2016-03-03 13:24:40 +01:00
Odoo Translation Bot 39d7abae26 [I18N] Update translation terms from Transifex 2016-02-28 00:34:20 +01:00
Odoo Translation Bot f83c28eb72 [I18N] Update translation terms from Transifex 2016-02-22 11:06:52 +01:00
Odoo Translation Bot ee42be5921 [I18N] Update translation terms from Transifex 2016-02-14 00:34:15 +01:00
Christophe Matthieu 55c7d2d5b0 [FIX] web_editor: don't convert style into class by default. Only if use style-inline (because very poor performance for sale.order form view because contains very crappy dom in website_description field) 2016-02-08 12:20:10 +01:00
Odoo Translation Bot f2146d360d [I18N] Update translation terms from Transifex 2016-02-07 00:33:44 +01:00
Nicolas Lempereur 7c11d4e70f [FIX] web_editor: minor tweaks IE11
In IE11 the values can be not string (for example a number and so not
have .indexOf method), but then there will no be !important bits and we
can just ignore this feature (which check if an overriding rule has an
!important flag).

There was another edge case when getting a "" set style, we get undefined.

opw-667917
2016-02-04 16:50:22 +01:00
Odoo Translation Bot 3b4bbb8c28 [I18N] Update translation terms from Transifex 2016-01-31 00:33:36 +01:00