Commit Graph
543 Commits
Author SHA1 Message Date
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Christophe Simonis 1ef4061e68 [MERGE] forward port branch saas-11 up to 3b2f4e2 2016-11-17 14:48:43 +01:00
Christophe Simonis 3b2f4e244f [MERGE] forward port branch 9.0 up to 7ee09ed 2016-11-17 14:37:19 +01:00
Nicolas Lempereur 897290dd3f [IMP] web_editor: don't lose modified code view content
The scenario when using the code view is the following :

- click on code view button to use code view
- make changes
- click on code view button to get back to wysiwyg view
- save from the wysiwyg view

If the 3rd step is not done:

- for the inline editor, we lose the changes that have been done in code
  view,
- for the iframe editor, we lose the entirety of the content.

At one time the user was forced to go back to wysiwyg before being able
to save, but this have been removed hence the present usability issue.

With this fix, when the editor content is saved, if the user is in code
view he is automatically set back to wysiwyg view.

closes #14339
opw-693052
2016-11-16 14:06:01 +01:00
Christophe Simonis dece72d010 [MERGE] forward port branch saas-12 up to ca20038 2016-11-15 13:58:55 +01:00
Christophe Simonis ca2003839a [MERGE] forward port branch saas-11 up to 58f68cc 2016-11-15 13:19:55 +01:00
qsm-odoo 2757775ed3 [FIX] web_editor: allow vimeo, youku and undefined video sources again
The refactoring made with https://github.com/odoo/odoo/commit/62fb1bb92493b00bd45ed3f4eced5ca8b23f81d6#diff-2b3acc31ced2b1e9f7522a3e29f33c22L825
broke the possibility to add vimeo, youku or other undefined video
sources.

This is because of jQuery. With jQuery you can create elements thanks to
multiple methods. From least efficient to most efficient:

- All in a string:
$("<tag attr1='value1' attr2='value2'/>");

- Tag in a string, attrs thanks to methods:
$("<tag/>").attr("attr1", "value1").attr("attr2", "value2");

- Tag in a string, attrs in second arg:
$("<tag/>", {attr1: "value1", attr2: "value2"});

The mentionned refactoring transformed the use of the second method
into the use of the last one. But there is a bug in jQuery: you cannot
use the first method and the last one all together. So:

$("<tag attr1='value1'/>", {attr2: "value2"});

will create a tag with attr1 but will totally ignore the attr2 part.

It happens that the allowfullscreen attr was left directly in the
creation string for vimeo and youku, preventing the src to be added.

This commit removes the use of allowfullscreen attr as fullscreen
is already handled by source players anyway.
2016-11-14 17:32:23 +01:00
Martin Trigaux 014a6e283f [I18N] export 10.0 source terms 2016-11-14 16:57:46 +01:00
Christophe Simonis f93bada93e [MERGE] forward port branch 9.0 up to fb763f3 2016-11-14 14:56:14 +01:00
Odoo Translation Bot 7a800427df [I18N] Update translation terms from Transifex 2016-11-13 03:42:40 +01:00
Christophe Matthieu 6da7628b86 [FIX] web_editor: split h5,h3,...p... node to insert table
opw-686393
2016-11-08 15:48:47 +01:00
Christophe Simonis 3d085f632d [MERGE] forward port branch saas-12 up to 6386037 2016-11-08 15:01:20 +01:00
Christophe Simonis 63860373ac [MERGE] forward port branch saas-11 up to c19f546 2016-11-08 14:43:28 +01:00
Christophe Simonis c19f546505 [MERGE] forward port branch 9.0 up to b795755 2016-11-08 14:20:07 +01:00
Christophe Matthieu af865c2e9e [FIX] web_editor: widget html preview doesn't match wysiwig editor (widget html iframe)
The widget html is used for plain text and html content.
Need to check if the content is a valid html code, if is not wrap with p tag every lines.

opw-692158
2016-11-07 12:02:13 +01:00
Odoo Translation Bot 7cfbdd57b4 [I18N] Update translation terms from Transifex 2016-11-07 11:09:10 +01:00
Odoo Translation Bot 9da2f44587 [I18N] Update translation terms from Transifex 2016-11-06 03:41:11 +01:00
Odoo Translation Bot ac1c9b6cb4 [I18N] Update translation terms from Transifex 2016-11-06 00:36:01 +01:00
Christophe Matthieu a8e79e960a [FIX] bus,im_odoo_support, web*: fix various memory leaks
* Tip are never destroyed when change view mode
* unbind methods
* mail: memory leak with unbind methods
* web: memory leak because 'ui-autocomplete' is never destroyed
* web_editor: memory leak for wrong unbind on destroy
* web: memory leak: must remove fileupload handler
* bus: memory leak: correctly debind handlers on window in bus.Bus
* remove handlers on switch buttons and views $buttons
* remove handlers on breadcrumbs
* web: memory leak: correctly debind handlers
* im_odoo_support: memory leak: remove fileupload handler odoo_support

Note: part of this commit was actually authored by aab
2016-11-04 14:07:35 +01:00
qsm-odoo 229fab5fa0 [FIX] web_editor: do not delete empty .oe_structure element
If a snippet contains a .oe_structure element inside of it, it allows
the user to drop other snippets in that location. The web_editor
contains code which removes all empty parent of an element being
deleted. This is done so that, for example, when the last col of a
3-col snippet is removed, the whole snippet is removed.

However, there was an exception to this rule which was not considered,
if one of these empty parent is an .oe_structure, it should not be
removed.

Note: the only snippet which does this is the parallax snippet.
2016-11-03 16:45:27 +01:00
Christophe Simonis ab98523315 [MERGE] forward port branch saas-12 up to 0ca99ff 2016-11-02 17:56:37 +01:00
Nicolas Lempereur 76be5eed44 [FIX] web_editor: don't paste two times
When pasting, the paste event is cancelled and done back with the
corrected data.

This works fine on firefox, but this can have unwanted results on other
browser like pasting two times or copying the end of the line at the
beginning.

This commit replace completely the summernote functionality with our
small implementation of pasting corrected text.

closes #14043
opw-690814
2016-10-31 13:27:00 +01:00
Odoo Translation Bot 9d243ae9ea [I18N] Update translation terms from Transifex 2016-10-30 03:37:27 +01:00
Odoo Translation Bot 27413feac8 [I18N] Update translation terms from Transifex 2016-10-30 00:34:38 +02:00
qsm-odoo 976fdc4402 [FIX] website, web_editor: correct split of displayError function
Before the ace editor was split so that it can be used in the backend
and the frontend, the displayError function finished by:
website.error(a, b);

As website.error cannot be used in the backend, the method was changed
to return the error and the extensions of the method were in charge
of displaying it. Unfortunatly this return was done like this:
return a, b;
which is not valid javascript.

Now the method return an object with a "title" and a "message" value
instead of wrongly returning two values.

Note: this fix relies on another fix which will be forward-ported from
saas-11.
2016-10-24 16:47:05 +02:00
qsm-odoo 9a75c6d608 [FIX] web_editor: correct ViewEditor widget life cycle
These two fixes are now important since the ViewEditor is now also
used in the backend.

* The start method must return a deferred.
* The destroy method must unbind the event on the document element.

Note: in master, the ViewEditor is being refactored.
2016-10-24 10:52:00 +02:00
Odoo Translation Bot e45d402396 [I18N] Update translation terms from Transifex 2016-10-23 03:38:54 +02:00
Odoo Translation Bot f74ea276cd [I18N] Update translation terms from Transifex 2016-10-23 00:35:59 +02:00
Odoo Translation Bot a40c3bf792 [I18N] Update translation terms from Transifex 2016-10-18 11:50:34 +02:00
Odoo Translation Bot 2ce7679032 [I18N] Update translation terms from Transifex 2016-10-16 00:34:35 +02:00
qsm-odoo a2ae219d4e [FIX] web_editor, website: fix customize_template_get
Commit e11f23b701 split the website
customize_template_get into web_editor and website ones. This split
was not perfect and commit 20861b482a
tried to make it work... but did not made it totally and added an
indirect dependency to website module in web_editor...

As the final result is wrong and inconsistent and that the previous
9.0 implementation was already ugly, this was not possible to make
a consistent full-stable fix.

This commit tries to make a fix as stable as possible (the main method
name did not change, the arguments did not change, their purpose is
the same, ...) which makes the code work and be less ugly. However,
the function returns are now slightly different (and JS depends on it).
It returns only valid view information (not header stuff which is not
related to anything and the inherit_id value is now a combination of
the inherit view id and name). Also, a new private method has been
created.

Also, the method contained code which was deprecated since saas-6 but
was never removed (and never broke anything "by chance").

In master these methods will be refactored to make more sense.
2016-10-14 13:16:49 +02:00
stefanorigano 39d74a7136 [FIX] web_editor: improve web_editor UI style preservation
* add and use preservation mixins to prevent undesired customizations
made by themes
* remove some style preservation code (and use the mixins instead)
* add UI states' colour variables
2016-10-13 17:01:04 +02:00
stefanorigano 63fdde638b [FIX] website: fix usability/design issues in o_select_media_dialog 2016-10-13 17:01:03 +02:00
qsm-odoo 6c9b2e202c [FIX] web_editor: change attachment/image icon in editor bar
The image icon was not clear enough. The editor bar appears in the
website builder, the mail composer, the forum composer, ... In each
of them, we can both link a picture or a file but a picture makes
more sense in some context and in some other ones not.

This commit solves the problem by changing the icon to fa-file-image-o
which is a mixed of file and image. This also solves the problem of
having two buttons with the image icon in the website builder (indeed
an image icon is also used for the image look button).
2016-10-10 15:31:36 +02:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
qsm-odoo 6c284a18d4 [FIX] web_editor: allow website_animate to preview image animation
Animation preview on images did not work as the web_editor stopped
every potential animation when an image entered edition. As the
behavior does not seem useful as there is no infinite animation which
is possible with standard odoo (and even if it was the case, it would
not be too strange that the animation continues), the feature is
removed with this commit.
2016-10-04 16:43:34 +02:00
Odoo Translation Bot b33415f3bd [I18N] Update translation terms from Transifex 2016-10-02 00:35:04 +02:00
Jeremy Kersten e2fb1cb6ce [FIX] web_editor: add missing import
Thanks to my Linter...
2016-09-30 15:11:58 +02:00
Jeremy Kersten 20861b482a [FIX] website: fix customize_template_get
broken by e11f23b
If not full, result was always empty

This commit fix the list of view when you click on Customize top menu in website.
This menu should only display the 'customize_show' views.
2016-09-30 15:11:58 +02:00
qsm-odoo 984afdf120 [FIX] mass_mailing, web_editor: set up correct iframe communication
Previous commit tried to handle iframe assets in a more standard way
but instead broke the order followed to install iframe communication.

While waiting for a more clean way to handle iframe assets and
communication, revert to old set up.
2016-09-30 12:19:46 +02:00
qsm-odoo c7e837d962 [IMP] mass_mailing, web_editor: propose installation of mass_mailing_themes
When an user starts a new mail template, he is now proposed to upgrade
to enterprise to install mass_mailing_themes.
2016-09-30 12:19:46 +02:00
Martin Trigaux 3189438450 [I18N] export 10.0 source terms 2016-09-29 16:51:51 +02:00
Martin Geubelle e11f23b701 [REF] web_editor, website: move ACE editor to web_editor
The commit e59a7fe3ff has moved
the ACE editor from website to web_editor. As some code on ir_ui_view
was used for this widget, the code has also been moved to web_editor.
2016-09-28 16:55:51 +02:00
Géry Debongnie b782a5d922 [FIX] web_editor: fix various issues with ace editor
Ace editor is not very smart, it does a rpc for each inherited view, it
tries to load workers before deciding not to use them, and it does way
too much work in general.  This commits tries to make sure that only the
necessary rpcs are done (lazily).

fix some issues with ace editor: lazy loading

fix various issues with ace editor
2016-09-28 16:55:51 +02:00
Christophe Simonis a7ba6cde9c [MERGE] forward port branch saas-12 up to 7134aff 2016-09-28 16:28:31 +02:00
qsm-odoo d04a42022b [REF] website, *: review website access rights
* event, website_event, website_forum,
* website_hr_recruitment, website_sale

Website access rights were buggy. The editor assets and website editor
assets have to be loaded together to work so the previous behavior
which only loaded one with the restricted access right was not right.
Also, people which had the "Manager" access right for model like event
or job only got access to creation and edition of those objects if they
had the full access to website access rights.

Now the website module creates the two same groups :
* group_website_publisher: load all editor assets, give access to
page creation for model the user has access (event, job, ...) and
edition of those pages
* group_website_designer: implies the first one and give access in
creation and edition of all pages + access of all website menus

The manager access rights for event, product, jobs, etc now implies
the group_website_publisher group for the user (so that the manager
have the editor assets and editor ui).
Note: some python codes use the group_website_publisher for no right
reason, this has to be adapted.
2016-09-28 15:56:04 +02:00
qsm-odoo 5f98040430 [FIX] website, *: properly process saving from editor dialogs
* web_editor, website_blog

Since recent refactoring, web editor dialogs automatically trigger
an event when closed (saved or cancel). The problem is that there
still was manual trigger of those events or variants ("save" instead
of "saved").

To prevent multi-saving and be consistent, all save events are now
automatically triggered on save/close (no more manual) and the event
name is "save".
2016-09-27 15:42:31 +02:00
Martin Trigaux d59d95107e [I18N] Update master translation terms from Transifex 2016-09-26 11:44:55 +02:00
Odoo Translation Bot 2a893606ae [I18N] Update translation terms from Transifex 2016-09-25 00:40:39 +02:00
qsm-odoo c4ef26d100 [IMP] web_editor: mark dirty text to translate with the translated color
The content to translate is yellow and the translated content is green
in page translation mode. When the user starts translating a paragraph
it stayed yellow, making it difficult to see the remaining content to
translate when translating a big page.

This commit colors the dirty text in a paler green so that the user can
see the distinction.
2016-09-23 11:16:16 +02:00