Commit Graph
159 Commits
Author SHA1 Message Date
qsm-odoo df004ac605 [FIX] web_editor: bg-* bootstrap colors
Wrong values for background-colors for bg-* classes of web_editor.
2016-03-01 17:56:27 +01:00
qsm-odoo acd3da1848 [FIX] web_editor: bootstrap colors (text-, bg-)
Bootstrap handles the primary color in a different way than the other
colors. So to not break the backend UI, the o-create-color-classes
mixin has to consider this difference.

Notice that colors management should be further improved in the future.
2016-02-26 13:09:13 +01:00
qsm-odoo 5a099117c4 [FIX] web(_editor): qunit tests
* Correct qunit template assets
* Delete useless template which broke qunit qweb inheritance
2016-02-25 14:45:34 +01:00
qsm-odoo ed46965dbe [FIX] web*: tours
Selector changes + No need to open the snippet panel anymore.
2016-02-24 13:47:36 +01:00
qsm-odoo 6610d05549 [REF] web_editor,website,mass_mailing: JS/XML update
* Adapt DOM selectors
* Refactore dialog XMLs to have odoo styling
* New editor options (background-position, ...)
* Various improvements
2016-02-24 13:47:36 +01:00
qsm-odoo 5b65befcd8 [REF] web,web_editor,website,report,mass_mailing,mail: LESS
* Convert some CSS to LESS
* Split/Join LESS files
* Remove duplicates between website and web_editor
* UI improvements
* Allow simple customizations thanks to LESS var&mixins for website
2016-02-24 13:09:48 +01:00
stefanorigano c4a896a8a0 [REF] website,web_editor: complete restyling 2016-02-24 11:15:55 +01:00
Christophe Simonis d70fde0330 [MERGE] forward port of branch saas-7 up to cab5c48 2016-02-10 18:37:01 +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
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
Christophe Simonis 469e04e97c [MERGE] forward port of branch saas-8 up to 2611a81 2016-02-02 14:52:15 +01:00
Christophe Matthieu d958cf541a [FIX] web_editor: enter keydown create new td only if the caret is on the last char of the last line of the td 2016-01-28 14:57:21 +01:00
Christophe Matthieu 2b4fb7e195 [FIX] web_editor: remove style attribute if empty 2016-01-28 14:57:21 +01:00
Christophe Matthieu 51a1926353 [FIX] computed html field should not have "note-editable" class
opw-660810
2016-01-28 09:28:33 +01:00
Christophe Simonis 78d20b552b [MERGE] forward port of branch saas-8 up to 7e44ddc 2016-01-27 12:24:04 +01:00
Christophe Matthieu 3de1b4a4ac [FIX] web_editor: reduce the min-size of the html preview
opw-660810
2016-01-20 13:23:24 +01:00
Christophe Matthieu f93e03c4c7 [FIX] web_editor: can indent table cell (with button and tab)
issue: the user select some line and keypress tab without indent, and the button indent doesn't work in table cell
2016-01-20 13:23:24 +01:00
Christophe Matthieu 6e47472486 [FIX] web_editor: firefox can have undefined value for style and broke inliner feature 2016-01-20 13:23:23 +01:00
Christophe Matthieu 2ef6e249d0 [FIX] web_editor: merge span when paste, only if no content between tags
opw-667263
2016-01-20 13:23:23 +01:00
Christophe Matthieu 86b80689d7 [FIX] web_editor: remove empty table ligne when paste content 2016-01-20 13:23:23 +01:00
Christophe Matthieu e5112ee00b [FIX] web_editor: use iframe only for html widget with style-inline mode 2016-01-20 00:15:10 +01:00
Christophe Matthieu 365e298fb1 [FIX] web_editor: inliner don't apply color when background-color 2016-01-18 17:09:02 +01:00
Christophe Matthieu 57fe8147f3 [FIX] web_editor: don't add double p tag at the begin of the document 2016-01-18 17:09:02 +01:00
Christophe Matthieu 958656d7e6 [FIX] web_editor: inliner take in care the '!important' attributes 2016-01-18 17:09:01 +01:00
Christophe Matthieu b27d24bfe9 [FIX] web_editor: don't limit the css inliner to the class but for all tag
(can reduce the performances)
2016-01-18 17:09:01 +01:00
Christophe Matthieu 4e0e376b0a [FIX] web_editor: use iframe instead of direct content for preview
The preview is not equal to the real email rendering because the backend css is present.
2016-01-18 17:09:01 +01:00
Christophe Matthieu 6e1ed6c8bb [FIX] web_editor: paste simple text must wrap first line by p and remove unless font 2016-01-14 15:21:39 +01:00
Christophe Matthieu faa7c750b2 [FIX] web_editor: change height for html field in readonly mode
issue: breaks the preview form views
opw-660810
2016-01-14 14:39:00 +01:00
Nicolas Lempereur 5c50ba322f [FIX] web_editor: title tag with translation
b24d759 changed the wrapping translation span tags, this commit take it
into account for the "translation" title tag.
2016-01-14 11:20:00 +01:00
Nicolas Lempereur 060cff9be3 [FIX] web_editor: get unlink button working
f3f7bd9 improved some link editing behaviour by adding contenteditable
attribute on it.

But if contenteditable is set on a link, using command "unlink" on the
element for `document.execCommand` does not work.

Hence this commit adds a code so the first click outside the link remove
contenteditable.

closes #10436

second-part-of: opw-659772
2016-01-13 16:28:29 +01:00
Christophe Matthieu 10efb0621f [FIX] website: editor: enable/disable save/undo/redo button when resize snippet 2016-01-13 16:05:22 +01:00
Christophe Simonis 63c7488926 [MERGE] forward port of branch saas-8 up to 5f997bc 2016-01-12 16:12:32 +01:00
qsm-odoo cb79297a41 [FIX] web_editor: links edition (only website links)
Commit f3f7bd9f24 adds an improvement which allows the user to edit links in
an easier way. The problem is that it also allowed to edit... the edit
buttons (example: the discard button).

This commit moves the mentionned commit code below the code that checks
if the target can be edited or not.
2016-01-12 15:03:23 +01:00
Christophe Matthieu 0b2728d8b2 [FIX] web_editor: error when long delete keypress in mass_mailing html
issue: event does not a global var in firefox, and event is already prevented
2016-01-11 15:23:36 +01:00
Christophe Matthieu 50057c08aa [FIX] web_editor: clean pasted dom and avoid crappy dom
Chrome on windows add few comment tags and insert unwanted span.
2016-01-11 15:20:49 +01:00
Christophe Simonis 4852d6033d [MERGE] forward port of branch saas-8 up to 99b6cd8 2016-01-07 18:21:13 +01:00
Christophe Simonis 5ba5172d99 [MERGE] forward port of branch saas-8 up to 8064379 2016-01-07 15:16:56 +01:00
Christophe Matthieu 7fcce928f3 [FIX] web_editor: allow custom template for html_frame field 2016-01-07 09:52:56 +01:00
Nicolas Lempereur dccecaf11f [IMP] web_editor: use unicode number for FontAwesome controller
In some non-usual circumstances, using unicode in controllers can lead
to issue. For example on a terminal using C encoding (instead of the
mighty UTF-8) werkzeug might use sys.getfilesystemencoding to encode the
request URL which will fail with UTF-8 inside.

This commit change the URL character of the font awesome controller to
UTF-8, but keep the old way since every sent mail might still use it.

There is the overlap of character 0 to 9 which are overidden in this
commit by unicode code 0 to 9, but these were not used in font-awesome
anyway (or these are not even visible ASCII characters).

closes #9572
2016-01-06 15:31:03 +01:00
Nicolas Lempereur 4bdba4af85 [FIX] web_editor: inline editor should not devore focus
The FieldTextHtmlSimple widget would focus on itself when changing its
value not by direct user interaction. But if this change was coming
from next/previous record, or an onchange that was breaking the
"autofocus" heuristic for field in Odoo.

With this commit:

- the autofocus heuristic is kept,

- if focused, selection is set at the end if it is possible on the
  browser, else (old internet explorer and not visible field) the
  selection is at the beginning.

opw-660486
2015-12-28 17:08:55 +01:00
Christophe Matthieu 16a3bc7f22 [FIX] web_editor: unbind summernote mousedown on detach/stop editor 2015-12-15 10:47:50 +01:00
Christophe Matthieu f3f7bd9f24 [FIX] web_editor: help the user to edit the link
User can't edit the first and last chars of a link (same issue for a lot of editors), and users don't want to click on edit link button in the editor bar.
When the user click (not if the user use arrow) on a link the link is activate with a content editable true and can edit the first and last chars.

opw: 654280
2015-12-15 10:47:50 +01:00
Nicolas Lempereur 893fbc0553 [FIX] web_editor: keep inline editor line spacing
opw-657955
2015-12-10 15:53:07 +01:00
Christophe Matthieu 3c64ee45a1 [FIX] web_editor: enter in a p tag empty (when user change with code view) can be raise an exception 2015-12-10 15:17:44 +01:00
Christophe Matthieu 6cc99df83e [FIX] web_editor: error when paste without any content in clipboard 2015-12-10 15:17:44 +01:00
Christophe Matthieu b72a3b67f8 [FIX] web_editor: remove exceed span on paste html content 2015-12-10 15:17:44 +01:00
Christophe Matthieu 2e074cb305 [FIX] web_editor: don't display translation modal for attribute on tag who have content 2015-12-10 09:10:29 +01:00
Christophe Matthieu 5257721bef [FIX] web_editor: translation feature for all string fields on website
* add the branding in translation mode
* change javascript to add the lang in the context (automatically removed in the rte => allow to create record and edit when use an other default language of en_US)
* avoid double saved
2015-12-10 09:10:29 +01:00
Christophe Matthieu 512ae81920 [FIX] web_editor: add code view in debug mode to allow jinja insertion 2015-12-08 09:50:11 +01:00
Christophe Matthieu d1af67bf28 [FIX] web_editor: img classname is removed when change the url 2015-12-03 13:26:36 +01:00