Commit Graph
198 Commits
Author SHA1 Message Date
qsm-odoo 73898ccb8b [IMP] web_editor: change image edition toolbar
* Move description button at the end of the toolbar
* Add an "auto" state button for the image width (alongside 100%,
50% and 25%) (when these last three are unchecked, the auto button
becomes checked).
2016-07-05 18:05:24 +02:00
qsm-odoo c259b38ef5 [IMP] web_editor: background + color snippet options
Now, when choosing a background-color when a background-image has
already been selected, the background image is removed on hover/click
of the color option.
However, the opposite operation remains the same. So if you choose a
background-color, you can then choose a background-image and the
colors will be kept.
2016-07-05 18:05:24 +02:00
Simon Lejeune eed7fdb6fe [REF] web_editor: cancel method of RTE should be async
and return its deferred. This commit makes the behavior consistent with
the `save` method.
2016-07-05 17:44:56 +02:00
qsm-odoo 36f31306e5 [IMP] website(_*): adapt tours
Adapt tours according to website/web_editor DOM changes.
2016-07-04 17:24:00 +02:00
qsm-odoo 821d2edf04 [IMP] website,web_editor: snippet option li icons
+ Some content changes
2016-07-04 17:24:00 +02:00
qsm-odoo c12f2cd5cc [REF] web_editor,website(_*): snippets
Refactor snippet structure
* new "cover" snippet
* move the title out of col-md-12
* delete snippets (s_quote_slider)
* rename snippets (FAQ Roller -> Accordion)
* ...

Refactor the way the background images are handled so that themes
can customize the defaults ones easily without ugly xpath or ugly
css.
2016-07-04 17:24:00 +02:00
qsm-odoo b309f3ab54 [IMP] web_editor,website: snippet options (parent & deletion)
* Always allow to delete a part (and delete parent if empty)
* Show parent options (by displaying the snippet name if any,
"column" for col-* and "Block" otherwise)
* ...
2016-07-04 17:23:59 +02:00
qsm-odoo 05d064f855 [IMP] website,web_editor: review style / content
* Mobile preview dialog
* Add page dialog (allow to click anywhere to close the modal)
* Change label for "auto resize" and "resize" options to "auto size"
and "fixed size" and add a checkmark to the currently active one
* Overlay border / Options dialog content
* Hide the odoo navbar after a delay when the editor starts
2016-07-04 17:23:59 +02:00
qsm-odoo 906875fc78 [IMP] web_editor: user text copy/paste
Users copy/past text from various king of document into the editor.
These texts contain useless line breaks that should be removed before
pasting. Also, the editor currently add a paragraph element between
each line.

To correct this behaviour the onPaste callback of the summernote lib
is used. However for some reason, this is triggered after the text
is pasted (we should update and refactor the lib in a better way).
So this commit uses a hack: undo the past thanks to the undo command
then paste the formatted text we want.
2016-07-04 17:23:59 +02:00
qsm-odoo 62fb1bb924 [REF] web_editor: code refactoring and simplification
* Remove dead code + optimization
* Use Dialog API from web module
* Reorganize files
* Correct buggy $() function for snippet option class
* Add comments

* Fix the snippet parent navigation :

If a page contained a three level snippet structure (i.e A contains
B contains C), when editing the following bug occured :

If B or C was selected first, parenting buttons were correctly set.
But if selecting A then C, clicking on the parent lead to going back
on A instead of going on B.

* Fix snippet thumbnail layout
* Better isolate ui css from themes
* MediaDialog image list : prevent displaying empty attachments
* ...
2016-07-04 17:23:59 +02:00
Simon Lejeune 314a680ab4 [FIX] web_editor: save method of RTE is async
So if you include this method without returning the deferred, weird
things happen and i lose a lot of time.
2016-06-22 17:56:22 +02:00
Christophe Matthieu 7ede9bcb2d [IMP] base ir.qweb: compile template (and use ast) to improve rendering speed
* The compiled templates are cached per user, lang, inherit context values
* ir.ui.fields: attributes method return an dict, and record_to_html return only the content value of the field
* all rendered text use build_text and all attributes use build_attribute
* t-esc-options is removed and replace by format_value method
* AssetsBundle receive the list files and remains
2016-06-14 09:46:25 +02:00
Jainik Patel eda051f43d [REM] web: Remove GTK icons and replace them by Font-awesome 2016-06-13 12:04:17 +02:00
Christophe Matthieu d0f4b5f608 [FIX] web_editor: display background color to translate 2016-05-26 08:13:33 +02:00
qsm-odoo ea2e0eea78 [FIX] web_editor: snippet colorpicker option
When going over the colorpicker when no bg-* class was selected yet,
the bg-undefined class was added on the snippet.
Also, when clicking on the reset button, the bg-* class was removed
but the selected button in the colorpicker was not unselected.
2016-05-24 17:49:14 +02:00
Christophe Simonis c4bba868f0 [MERGE] forward port of branch saas-9 up to 087729f 2016-05-13 15:58:06 +02:00
Christophe Simonis 7f2a9e77b6 [MERGE] forward port of branch 9.0 up to dcab356 2016-05-13 14:08:51 +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
qsm-odoo 89c0266b93 [FIX] web_editor: backend colorpicker in editor
The web_editor.colorpicker defines a series of color buttons which
toggle the bg-* and text-* classes. The problem is that themes can
define new buttons whose bg-* and text-* classes only exist in the
frontend. So these buttons should not be displayed in the backend.
Only solution for the current implementation is to add this ugly rule
(in this backend file) which hides every button and redisplayed the
default ones.

This fix is temporary and has to be improved in next versions.
2016-05-02 11:06:09 +02:00
qsm-odoo e3ce70a64d [FIX] web_editor: backend editor style
The editor had been restyled thinking its DOM structure was the same
in every context. The problem is that the message composer editor
DOM structure is different. So, some important style like button
icons were missing in this context.
2016-05-02 11:04:14 +02:00
Christophe Simonis bb8f0f1fc3 [MERGE] forward port of branch saas-9 up to 4d337f7 2016-04-25 14:43:44 +02:00
Christophe Simonis 4d337f72ed [MERGE] forward port of branch 9.0 up to ac7beb3 2016-04-25 13:33:01 +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
Olivier Dony ee804e1d32 [MERGE] Forward-port 9.0 up to 74d8cbc190 2016-04-21 18:05:14 +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
qsm-odoo f49739124d [FIX] web_editor, website: snippet handles and add job offer
* Bad forward port of saas-9 created a bug where the snippet handles
were wrongly positioned.
* The add job offer button did not work as the modal was marked to
dismiss itself on click (and because this button has not any handler
attached to it; it's the only real link amongst the add buttons).
2016-04-06 16:36:38 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Denis Ledoux 17f4d22594 [MERGE] forward port of branch saas-7 up to 2d2028a 2016-04-01 11:26:27 +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
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
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +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
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
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
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