Commit Graph
61 Commits
Author SHA1 Message Date
Christophe Matthieu d459359e87 [IMP] web_editor: Convert font-awsome into picture before convert class into style to remove unnecessary style attributes 2015-09-28 15:23:35 +02:00
Christophe Matthieu bdf58adb46 [FIX] web_editor: send mail to outlook and keep image size
Office Outlook doesn't take into account the [style] attribute, and it
doesn't manage width/height in percent value.

This commit set width/heigth attribute in pixels and also always set the
width/height in style attribute (keeping them in the original unit and
setting them to auto if not present).
2015-09-28 15:23:35 +02:00
Christophe Matthieu 6ebcc06152 [FIX] web_editor: remove 'lang' from the context to save master website xml 2015-09-28 15:23:35 +02:00
Christophe Matthieu 9e428ae849 [FIX] web_editor: media trigger content_changed when change the media 2015-09-28 15:23:35 +02:00
Christophe Matthieu 4ba0232bf8 [FIX] web_editor: apply o_dirty class on change
Before: if a user blur a editable area without editing, the editor is removed and all bind are remove.
The 'content_changed' bind are removed and the 'o_dirty' class is never apply.
2015-09-25 16:06:21 +02:00
Christophe Matthieu 743f26a796 [FIX] web_editor: display editable area placeholder 2015-09-25 16:06:21 +02:00
Nicolas Lempereur eed63c793a Revert "[IMP] web_editor: update summernote up to 2015-08-31"
Revert till several issues are solved.
2015-09-25 10:53:08 +02:00
Nicolas Lempereur 144b4f8098 [FIX] website: range lost in phantomjs 2015-09-25 08:30:23 +02:00
Nicolas Lempereur a3d355ada7 [WIP] web_editor: rename and delete old summernote files 2015-09-25 08:30:17 +02:00
Nicolas Lempereur 7747e0751f [IMP] web_editor: update summernote up to 2015-08-31
update summernote library up to revision:
 https://github.com/summernote/summernote/commit/a0f26e300

see https://github.com/summernote/summernote/ for history

closes #8704
2015-09-25 08:29:16 +02:00
Damien Bouvy 84b471cfa1 [IMP] web_editor: usability: allow saving even when nothing was changed when editing in the frontend 2015-09-24 11:50:25 +02:00
Christophe Matthieu 21c88933f7 [FIX] web_editor & website: don't display edit placeholder if the node have class oe_no_empty or oe_not_editable 2015-09-24 09:36:41 +02:00
Christophe Matthieu 27d1ce0454 [FIX] web_editor: transparency of modal backdrop instead of black brackground 2015-09-24 09:36:41 +02:00
Christophe Simonis cb0987889c [FIX] account_cancel,web_editor: small issues introduced during previous forward-port 2015-09-23 15:39:09 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Christophe Matthieu a41f915493 [FIX] web_editor: iframe of html widget must be checked before render value
If the iframe is destroyed, detached, hide (eg: click on a record, return into the list view and click on an other record), the render_value method try to resize the iframe but jQery raise an exception because contentWindow doesn't exist.
2015-09-21 13:45:36 +02:00
qsm-odoo 9632f897ad [IMP] web_editor: change font-family to webclient default 2015-09-11 11:38:07 +02:00
Nicolas Lempereur 7a5e5adb56 [FIX] website_mail: special case for css splitting
The css of a mail is inlined as best as possible for the mail sending.

Previously, if there was a selector like .ch[onclick="ga(this,event)"]
the simple splitting would split in the middle and get one erroneous
selector (which then would trigger an error).

With his commit, rules containing " or ' are ignored.

opw-643548

note: forward port of 6316bce
2015-09-08 13:29:23 +02:00
Nicolas Lempereur bc8e91b2aa [FIX] web_editor: update .o_form_field_empty when loaded 2015-09-04 14:45:14 +02:00
Nicolas Lempereur a134c88d00 [FIX] web_editor: do paste after removing selection 2015-09-04 11:54:05 +02:00
Nicolas Lempereur c32ea33632 [FIX] web_editor, translate: xml translate encoding
lxml.HTMLParser detect the content encoding by itself if not specified.

in the issue leading to this fix, content in a mail with u'\xa4'
( ) was transformed intto u'\xc2\xa4' ( ) since HTMLParser
selected the wrong encoding (latin-1 instead of utf-8 for example).

this commit specify the known encoding and revert 3d00c210f which was
another attempt at this issue.
2015-09-03 10:21:20 +02:00
Christophe Matthieu 0f6b97a6da [FIX] web_editor: clean_for_save is not called for custom snippets because all() not contains all html matched tags 2015-09-01 15:18:07 +02:00
Christophe Matthieu 447dd53de5 [FIX] web_editor: wrong typo in fontIconsDialog widget 2015-09-01 09:42:33 +02:00
Christophe Matthieu 4b5b6b5f6e [FIX] web_editor: drop near select children of editable nodes 2015-09-01 09:23:24 +02:00
Christophe Matthieu 3d00c210f9 [FIX] web_editor: html widget: escape value before save. 2015-09-01 09:23:24 +02:00
Christophe Simonis 044c0625ad [MERGE] forward port of branch saas-6 up to 7faf72c 2015-08-31 19:57:20 +02:00
Christophe Simonis 10a417c63d [FIX] web_editor: don't loose selection when deleting an image 2015-08-31 17:23:16 +02:00
Christophe Simonis a9abf18125 [FIX] web_editor: sould not delete de tag container when select all text inside (although there are several selected child nodes)
This is forward-port of 96b33cdbce that
was stuck in limbo in forward-ports...
2015-08-28 19:16:03 +02:00
Christophe Simonis edeceba7df [MERGE] forward port of branch saas-6 up to 7a768a4
Due to `sale` rewrite (94716a3f14),
the commit 503820acb6 has been partially
ignored (in sale.order.line) and will be rewritten later using new-api.
2015-08-28 15:07:16 +02:00
David Monjoie b322536aa6 [FIX] web_editor: fixed typos introduced by 88c0ce0
It seems this.BuildingBlock was changed to this.buildingBlock
by 8c559044a5. Care should be
taken when forward porting code using this.BuildingBlock.
2015-08-26 16:01:19 +02:00
Christophe Matthieu 8eb8a982f9 [FIX] web_editor: clean_for_save all dirty options
Clean for save was only called on o_dirty nodes but o_dirty is added only on o_editable nodes.
Could use a simple jQuery selector '.o_dirty, .o_dirty *' but need to improve speed for user experience.
2015-08-26 16:01:18 +02:00
Christophe Simonis 88c0ce0692 [MERGE] forward port of branch saas-6 up to e16d495 2015-08-24 18:19:19 +02:00
Christophe Matthieu 41e730cbfa [IMP] web_editor: add document into the media editor
User can upload documents and add the link in the page to download it.
2015-08-21 22:06:52 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Christophe Matthieu f434c475d4 [FIX] web_editor: can't save backend translation with field html 2015-08-21 16:15:02 +02:00
Christophe Simonis 73e652818b [MERGE] forward port of branch saas-6 up to 8d95f6d 2015-08-15 16:57:35 +02:00
Christophe Simonis 47f6b1bb32 [MERGE] forward port of branch saas-6 up to 081f21e 2015-08-06 17:44:09 +02:00
Christophe Matthieu 4474b5ac70 [IMP] web_editor: display not found snippets template warning message 2015-08-05 10:31:15 +02:00
Mohammed Shekha d434500ec8 [FIX]web_editor: Fixed the issue of firefox not able to enumerate on cssRules, it is due to Cross domain security policy of firefox, used try catch, so that if there is cross domain css then skip it, it should not break the system, atleast it should work for same domain css, cross domain css should skipped 2015-07-31 10:15:56 +02:00
Christophe Matthieu 5a4c8998e7 [FIX] web_editor: _.find break if the value is a space
Some classes are not checked. Compact values to remove empty string classes.
2015-07-31 10:08:58 +02:00
Christophe Matthieu 374436bff8 [FIX] web_editor: on firefox css rules doesn't have key with hyphen
On save (eg: in mass_mailing), the style contains 'undefined' values
2015-07-31 10:08:58 +02:00
Christophe Matthieu eb50e66d62 [FIX] web_editor: on firefox display snippets in one row
display snippets in one row instead of two rows
2015-07-31 10:08:58 +02:00
Christophe Simonis e182f19694 [FIX] *: various bug were introduced during last forward-port 2015-07-22 18:33:04 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Matthieu 264bb780a1 [IMP] web: web modules return readable logs and phantomjs logs
boot.js log:

* ``Missing dependencies``:
  These modules do not appear in the page. It is possible that the JavaScript
  file is not in the page or that the module name is wrong
* ``Failed modules``:
  A javascript error is detected
* ``Rejected modules``:
  The module returns a rejected deferred. It (and its dependent modules) is not
  loaded.
* ``Rejected linked modules``:
  Modules who depend on a rejected module
* ``Non loaded modules``:
  Modules who depend on a missing or a failed module
2015-07-22 12:15:25 +02:00
Christophe Matthieu 71732dceb6 [IMP] web: module can be asynchronous loaded if it return a deferred
Each module can return a deferred. In that case, the module is marked as loaded
only when the deferred is resolved, and its value is equal to the resolved value.
The module can be rejected (unloaded). This will be logged in the console as info.

Remove if_dom_contains from the website, the modules return a rejected deferred if
the DOM doesn't contains the seleted values.
2015-07-22 12:15:24 +02:00
David Monjoie df9725df26 [IMP] web_editor,website: added scalable margins in less
The original commit by fka used to define less variables like this:
@px-4: 4px
@px-8: 8px

The goal was to be able to change the margin values in
media queries for smaller screens.
However, as the less is only compiled once in css, those
variables didn't really help as you couldn't redefine them
from inside a media query and have the less magically
reassign the margins on the fly.

I created less helper functions to be able to easily redefine
the margins for smaller screens from inside media queries.

The task also required to replace the nbsp in the html by the
newly created mr and ml classes.

This is also the first phase of the sass -> less transition.
2015-07-20 15:00:24 +02:00
Aaron Bohy c22d75bdc5 [FIX] web_editor: restrict scope of css rules
within the editor, to prevent styling every tables in Odoo.
2015-07-17 09:53:23 +02:00
Christophe Matthieu 5d51aff938 [FIX] summernote: insert a p tag when try to insert a br with insertNode method, if the editor is inside a p, li, h1... 2015-07-10 17:00:16 +02:00
Christophe Matthieu 087fd6942b [IMP] web_editor: add test translator 2015-07-10 17:00:15 +02:00