Commit Graph
1794 Commits
Author SHA1 Message Date
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 499c2b8da5 [MERGE] forward port of branch saas-6 up to 580389a 2016-01-08 18:26:59 +01:00
Géry Debongnie 0336f109f1 [FIX] web_planner: hidden by default
The web planner should be hidden by default.  Now, it is displayed,
then hidden in js after a while (but it can be seen by the user), then
displayed again if necessary
2016-01-08 15:57:21 +01:00
Denis Ledoux 2afa1942ca [MERGE] forward port of branch 8.0 up to 7473f4a 2016-01-07 13:40:01 +01:00
Jairo Llopis 7f230a540e Remove the right backdrop.
If anybody adds a new modal in the `then()` part of the promise, without
this code, all `.modal-backdrop` elements will be deleted, and further
dialogs will not be modal; with this, only the current modal's backdrop
will be deleted.
2016-01-07 11:40:39 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
qsm-odoo bcca4a44c7 [IMP] web(_planner),website: navbars & menus merge
Merge appswitcher navbar and app navbar.
Merge planner menu and user menu.
2015-12-24 17:11:55 +01:00
Nicolas Lempereur df638109a3 [FIX] website: min-width of quantity spinner input
The size of the ecommerce cart quantity component (- button, input with
quantity , + button) is by default fixed at a given width, but given
some theme styling the padding of the buttons are so big there is not
even one figure visible in the input.

With this change, the appearance doesn't change for most themes, but for
bootswatch Cosmo and Flatly we go from seeing 0 figure to at least two
figures.

opw-658224
2015-12-11 11:45:12 +01:00
Jeremy Kersten b9e64d7732 [FIX] website: fix edit master when using old template
When no update has been done on website, we don't have this default-lang
data/attribute. So we use an hack to find the default lang which one is
the shortest because no lang is present in the url.
2015-12-08 23:38:19 +01:00
Nicolas Martinelli 1e9ce28f7b [FIX] website, web_editor: open in new window
The field `isNewWindow` is used to open a link in a new tab. In this
case, the field newWindow was used, and therefore the property was not
applied.

opw-657510
2015-12-02 10:00:16 +01:00
Denis Ledoux 13e1f7afac [MERGE] forward port of branch 8.0 up to 3e03cfe 2015-11-24 16:51:45 +01:00
Denis Ledoux 3e03cfe7ac [FIX] website: type openerp -> odoo
opw-657169
2015-11-24 16:09:19 +01:00
Yannick Tivisse 9f2b6e00ef [IMP] website: Add a class btn-multi-line to allow multi line labels on buttons
On website_quote, according to the translation, the label may become much larger than
the button width. By default the bootstrap btn class has the property 'white-space: nowrap'
Here the goal is to add a class which will be used for these kind of cases.
2015-11-20 16:41:37 +01:00
qsm-odoo cb16d20909 [FIX] website: theme customization modal crash
When clicking on customize theme button or going on an url which
contains the theme=true option, the theme customization modal failed to
be launched as we did not wait for website to be ready.
2015-11-19 17:14:56 +01:00
qsm-odoo 3c2e48423b [FIX] website: nested container width
Add !important flag to the width:auto rule for a container inside a
fixed width parent. Notice that there should not be any container
inside another container (this would allow to remove this rule) but
this makes sense for the "readable" class.

This fix is made to solve website themes issues.
2015-11-16 16:07:43 +01:00
Nicolas Lempereur 0a0df28fd9 [IMP] website: add special char to rte_translator tour
To test the the use case solved with f5acea7.
2015-11-03 16:00:46 +01:00
Christophe Simonis b34a62a3e8 [MERGE] forward port of branch 8.0 up to 27b3851 2015-11-03 12:58:02 +01:00
Denis Ledoux d5d8140f3a [MERGE] forward port of branch saas-6 up to 7158eaf 2015-11-02 18:06:25 +01:00
Nicolas Lempereur 70d0026125 [FIX] website: don't unescape translation text node content
When we had things like   or & in a text we want to translate,
the translation system would save it unescape (so \xa0 and &).

So in this instance, the traduction would not match the real source
which was not subjected to this unescaping.

opw-653173

note: fix is courtesy of dle (no need to forward port after saas-6)
2015-10-30 16:14:03 +01:00
Nicolas Lempereur 1da79c54a1 [FIX] web{site,_editor}: gallery upload image
* when getting the src of an uploaded attachment we have to use src which
  is by default url,

* in a MediaDialog the pager is shared between the document and image
  dialog, but when changing page, it was done for both (even if not
  displayed),

* select the image after uploading it in the ImageDialog.

closes #9284
opw-653061
opw-653167
2015-10-29 13:25:27 +01:00
Nicolas Lempereur 7ffc2916ee [FIX] website: slide position gallery snippet
Changing position of a slide from the gallery snippet was not working.

saas-6 part of #9284
opw-653061
opw-653167
2015-10-29 11:55:53 +01:00
qsm-odoo 58be02b927 [IMP] website: theme customization assets recomputing
Assets are now split in multiple files and there is not a route which
always leads to the last version of an asset. This commit adapts theme
customization (without reloading) to these new features.
2015-10-27 16:32:35 +01:00
qsm-odoo 7329a7fc55 [FIX] website: theme customization modal overflow 2015-10-27 16:14:14 +01:00
qsm-odoo b3590c7104 [FIX] website, web_editor: missing returns in theme JS 2015-10-27 16:13:44 +01:00
Christophe Matthieu d7b5eeabeb [IMP] web_editor: move picture options from snippet to summernote bar
Difficulty for the user to understand how to change the images.
Some options summernote being in the bar and the other in the snippets editor.
Need to merge this options.
2015-10-26 11:43:36 +01:00
Xavier Morel 7352b34f0d [FIX] website: broken rename_page JS method
Variables had been renamed/replaced everywhere except rename_page.
2015-10-02 14:32:58 +02:00
Christophe Simonis d750206c49 [MERGE] forward port of branch saas-6 up to e9f1ee4 2015-10-01 15:16:59 +02:00
Xavier Morel cea29e0c01 [ADD] client-side CSRF support
* add CSRF token as core.csrf_token
* add CSRF tokens to client-generated and/or JS-submitted forms
* remove broken "compatibility" mode of web.ajax.post

  /cc @dmo-odoo I've no idea how that was supposed to work, from looking
  things up all modern browsers seem to support FormData, and old IEs
  which don't don't support fallbacks either and would require
  submitting an actual form as fallback so...
2015-10-01 01:36:50 +02:00
Christophe Simonis 7636b510a2 [ADD] *: CSRF protection in forms and routes
* make CSRF protection the default on all non-SAFE methods
  note: there currently is no way to call a CSRF-protected endpoint
  without a form-encoded entity-body as that's the only place we get the
  CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
  generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
  the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
  the purpose of a CSRF token in the database manager screens.
  There is no request database to obtain the
  secret and generate a CSRF token.
2015-10-01 01:36:50 +02:00
Goffin Simon e9f1ee4d4a [FIX] website: edit mailto link
In function bind_data of website.editor.js, either href is a mailto link
or an url link but not both.

The function convert_links must not convert mailto links.

opw:650443
2015-09-30 21:25:17 +02:00
Nicolas Lempereur 7163d1692b [FIX] website: delay tour start till editor is loaded 2015-09-30 16:20:17 +02:00
Martin Geubelle 5946623d3f [FIX] website, web_planner: shared help comportement in frontend/backend
Help has been moved to web_planner, but only in backend. The comportement needs to be defined in website also so it is now shared in frontend and backend (mixin in common)
2015-09-28 15:42:44 +02:00
Jeremy Kersten fe3e91d1ff [FIX] website: fix footer
Inconsistency between col-md and col-lg (offset)
Add auto word wrap to avoid that text override next column
2015-09-25 16:38:09 +02:00
Jeremy Kersten d8f5b28554 [FIX] website: translation - don't crash if translation is empty
Avoid 'Uncaught TypeError: t.value.trim is not a function'
When t.value is empty / false, trim crash and so it's impossible
for end user to make translation.
2015-09-25 15:14:50 +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 1c460e3ca8 [FIX] website: can add block in translate mode.
Fix for saas-6 only, don't forward port.

If the user translate a record html field like product... and add block after in English version, the translation doesn't have the new blocks.
In version >= 9.0 the translations contain only textual contents (with font, bold, color...). If a user add a block in english the block appear in all translations (with new text marked to translate).
2015-09-23 16:16:52 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Denis Ledoux a3648fd23a [MERGE] forward port of branch 8.0 up to aabbdc7 2015-09-21 16:01:58 +02:00
Christophe Matthieu e8b57c1457 [FIX] website: addapt tour rte_translator wait for page load
Next steps executed before the next page loading could cause a test
false positive. Remove hack and use waitFor and WaitNot.
2015-09-21 13:45:36 +02:00
Nicolas Lempereur a473e425b2 [FIX] website: tour rte_translator wait for page load
Next steps executed before the next page loading could cause a test
false positive.
2015-09-18 13:29:48 +02:00
Nicolas Lempereur 3c39b62bce [FIX] website: escaping and external iframe
jQuery has a special behaviour when using .contents() over an iframe
object. This caused an error for escaping when saving the page with an
iframe content of an external domain.

introduced by 8c77c711
opw-649570
2015-09-18 09:41:32 +02:00
qsm-odoo f22686fb4d [FIX] website: published/unpublished button + useless code
For some strange reason, two CSS rules had different priorities between
firefox and chrome (which forced chrome to always display published and
unpublished at the same time).

The chosen solution is to change the value of the button in published/
unpublished instead of toggling and relying on CSS classes (with this
method, the DOM looks better too).

There was also duplicated code in website for assets_backend.
2015-09-15 13:17:43 +02:00
Jeremy Kersten ac8e28405d [FIX] website: website.theme.js make it re-usable and more flexible
Each theme was duplicating this file.
Now we need to improve this file to be re-usable by others themes.

This fix is only to catch input, in case of the selector is an image.
2015-09-14 16:30:39 +02:00
Nicolas Lempereur e03d64cfaa [FIX] website: remove cancelled request for mobile preview
In 7d40a7d, f820c07, 3ed0628 the way the mobile preview iframe is set
was altered several times. This left an inconsistent needless page load.

This page load was cancelled, but as a side effect in a given set of
conditions:

- an ajax request is done early in current (and so iframe) page,
- phantomjs is used for the test,
- server response time

this could lead to a false positive caused by a cancelled xhr request
throwing the error: "Can't load template, http status 0".
2015-09-14 10:13:25 +02:00
Jeremy Kersten 8f97374842 [FIX] website: fix translation - missing escaping 2015-09-07 18:07:34 +02:00
Simon Lejeune ef3d0d87bc [FIX] web_planner: tooltip on progress bar 2015-09-07 13:36:12 +02:00
Aaron Bohy 7d1590ef33 [FIX] web_planner: detach on close 2015-09-07 12:15:44 +02:00
Christophe Simonis 3bb0cb2a50 [MERGE] forward port of branch 8.0 up to 9c8b99a 2015-09-04 18:30:48 +02:00
Nicolas Lempereur 6672e45ba4 [FIX] website: better text node if delete and whitespace
If the node is a text node containing only empty space, we must replace
some of these space by an   so it can be selected.
2015-09-04 11:35:11 +02:00
Jeremy Kersten 443447a2b1 [FIX] website: set oe_manipulators at top of top-bar
Without this, oe_manipulator could be under the bar and so impossible to move, duplicate, delete, ... the snippet
2015-09-03 13:18:52 +02:00