| Age | Commit message (Collapse) | Author |
|
|
|
The web_editor app uses a 'cssFind' function but does not expose it. It
makes sense to move it in the web app in the 'dom' utility function set.
|
|
* web_editor, web_tour
jQuery has the built-in ':visible' selector. This is however not enough
as this only checks if the element and its parents have a visible
'display' property. Ironically, if the element has the 'visibility'
property set to 'hidden', it will be considered ':visible' by jQuery.
This commit creates the ':hasVisibility' and ':hasOpacity' selectors
which respectively check if the element and its parents have a visible
'visibility' property and a visible 'opacity' property.
|
|
* mail_channel, mass_mailing, twitter, event
- t-install attribute holds the technical name of the module that
needs to be install to use a particular snippet.
- Disable the drag & drop feature for these dummy snippets.
- Move some images to website module.
- Installed snippets display at the top of the list.
- Hide not-installed module snippets if user don't have rights to install module.
|
|
* web_editor, web_tour, website_event_track
Before this commit, one JS file was responsible for all the library
extensions and fixes. There were two main problems with this system:
- The file was only available in the backend (as some extensions are
made on backend-only libraries).
- Some other modules were doing library customizations.
This commit creates one file per library to regroup their associated
customization and adds them in the right asset. These are placed in
the web module and every other module should avoid doing customizations.
This allows to have libraries consistency accross all modules and
between the backend and the frontend.
|
|
|
|
|
|
When cloning a snippet section thanks to the editor, the associated
snippet options' `on_clone` methods are called. Now these methods
receive a new argument `options`. The option this commit introduces
is the `isCurrent` one. It allows the method to know if the snippet
section it is associated to is the one that was cloned or if it is a
child of the one that was cloned.
This is useful to solve a known bug when cloning elements which have
bootstrap columns:
- When one column is cloned we want it to lose its col-*-offset-*
classes so that the offset is not duplicated (only the column).
- When a container with column children is cloned we do not want
these column' offsets to be removed (we want the whole cloned
container to be the same).
|
|
|
|
|
|
The snippet options are attached to `closest`, `all` and `is` functions
to be able to find/check DOM they are associated to. Their behavior
depend on the snippet option type: the search in the DOM is either done
in the body, the editable parts, the editable children only, ....
The problem is that when searching from a given DOM element, jQuery
won't match the elements whose selector contains this given DOM element.
Or in code terms, jQuery find function behavior is:
`$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`)
This was indeed a problem on the job position apply form pages where the
main editable element is the <form/> element itself. Indeed, the snippet
options' selectors which began by 'form' were not able to match. Worse,
the selector is used for a jQuery search for drag & drop and saving but
not for initialization (where it is used as a `is` check on clicked
elements). So, some DOM were able to be modified by options but not
properly (re)configured before saving.
opw-705902
opw-741305
|
|
This commit comments the code of the Animation class and allows
for lazy loading of resources before animations' start methods
are called.
This lazy loading can be performed in the willStart method (to use
the same way as in the Widget class).
This commits also removes the "stop" function of the module as it
was not really useful. It was used to restart the animations (by
immediatly calling start again after the stop call). Now the Animation
class contains a restart method and the module "start" function
automatically knows if it has to instanciate an animation or restart
an existing one.
Animation start should only be performed by instanciating an Animation
(thanks to new) or by calling the restart method, to insure the
willStart method is always called. Anyway, the best way to start
animations is to let the system handle them, using the "selector"
attributes in your Animation definitions as before.
See in-code comments for details.
|
|
|
|
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.
|
|
|
|
Since saas-12, when deleting contents, parents are deleted too if they
become empty (while it was not possible to delete contents in that case
before). The problem here was that the history was recorded multiple
times if one deletion made multiple snippets be deleted and this
sometimes could crash.
Now the history is recorded only on first deletion when the user ask
for it.
|
|
* + web_editor
The feature was only activated in the web_editor in snippet contents
(before they are dropped in the page). Now, on first theme selection,
the feature is activated in the template content.
|
|
Following commit e634a52cace081edfce324f14228ddb419af0a31, the
show_blocks method had to be refactored to remove the dead code and
refactore the old one it contained.
|
|
|
|
|
|
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c95c3f69e94d65e10a4d4eda3726649.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).
As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
|
|
This code was introduced in 8.0 and has never been called.
|
|
|
|
|
|
|
|
When a snippet contains two p elements, they will both get the
"o_default_snippet_text" when placed in the page. The individual p are
then automatically selected on mouseup event. This induces strange
behavior when trying to select the two paragraph together ; indeed
only the paragraph on which you mouseup will be selected.
|
|
Before this commit, if we dragged a snippet and dropped it where we
began the drag, the snippet was removed.
|
|
The snippet options can define an on_remove method which was supposed
to be called when the snippet is removed. This was not the case since
the method was written so that the options were removed before the
on_remove method was called... (Un)fortunately, the on_remove callbacks
were not doing any critical job in current implementation. In saas-13
however, some elements will rely on this.
|
|
|
|
In some snippets, the parent hierarchy has many elements. So, when
selecting a deep child of one of those, the customize dropdown had
many dropdown headers showing the parent hierarchy but without any
option for many of them.
Commit de0d9fd6661691488fcf4fd546d89042c0c99a4b already fixed the case
where the dropdown only contains dropdown headers. This commit is an
adaptation to hide these headers one by one.
|
|
The feature was lost because of a programmation error (use of this in
a non-binded function).
|
|
* web_editor, website, mass_mailing
This menu allowed to scroll to the snippets sections by clicking on
their corresponding icons. It was useless as the sections are not
taking a lot of height. This also appeared buggy as clicking on the
last icon highlighted only the second one as this second one was still
the first section visible on the screen when the last section was
fully visible.
This also added fours buttons to the interface which contains already a
lot of them. Now this is replaced by a title "Add blocks" which makes
the editor cleaner and also improved the performance to enter the edit
mode.
|
|
Commit 57c09e8a8effe0e0ec8f96dd940218027789feaa was supposed to fix the problem but only made it
worse in some cases. Since the new option parenting system, the
customize button visibility should not be determined on creation as
parent and own options are appended on snippet focus. Also, removing
the dropdown header if it was alone was a bad idea as this is it which
contains the information of options and all the options have not
necessarily a <li/> tag in the dropdown.
For example, the many2one option has no <li/> in the dropdown and is
the only option of the field snippet. So with the previous commit, the
dropdown header was removed as there is no <li/> in the dropdown other
than this header. So as the header was removed, on snippet focus, there
was no way to determine the many2one option exists, so its on_focus
method was not called.
Now, the dropdown-header is always kept. The visibility of customize
button is determine on snippet focus.
|
|
The many2one fields and their search bar were not working anymore since
the loss of some functionnalities with commit b309f3ab543b5195eedc5b06ad08cfa81f43171a.
* The dropdown which regroups a snippet options list is hidden if it
does not contain any option. This was not the case anymore because it
now always contains a dropdown title. This is fixed by simply removing
this title if it is alone in the dropdown.
* Snippet options attached to an element whose parent is not editable
cannot be moved/deleted/duplicated as it is supposed to remain where
it is. This is often the case for many2one fields and the feature was
simply lost in the refactoring.
|
|
Commit 57c09e8a8effe0e0ec8f96dd940218027789feaa was supposed to fix the problem but only made it
worse in some cases. Since the new option parenting system, the
customize button visibility should not be determined on creation as
parent and own options are appended on snippet focus. Also, removing
the dropdown header if it was alone was a bad idea as this is it which
contains the information of options and all the options have not
necessarily a <li/> tag in the dropdown.
For example, the many2one option has no <li/> in the dropdown and is
the only option of the field snippet. So with the previous commit, the
dropdown header was removed as there is no <li/> in the dropdown other
than this header. So as the header was removed, on snippet focus, there
was no way to determine the many2one option exists, so its on_focus
method was not called.
Now, the dropdown-header is always kept. The visibility of customize
button is determine on snippet focus.
|
|
The many2one fields and their search bar were not working anymore since
the loss of some functionnalities with commit b309f3ab543b5195eedc5b06ad08cfa81f43171a.
* The dropdown which regroups a snippet options list is hidden if it
does not contain any option. This was not the case anymore because it
now always contains a dropdown title. This is fixed by simply removing
this title if it is alone in the dropdown.
* Snippet options attached to an element whose parent is not editable
cannot be moved/deleted/duplicated as it is supposed to remain where
it is. This is often the case for many2one fields and the feature was
simply lost in the refactoring.
|
|
* Start dragging after the mouse move of some distance
* Cancel drop if the user drops a snippet in the snippet bar
|
|
* 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)
* ...
|
|
* 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
* ...
|
|
So if you include this method without returning the deferred, weird
things happen and i lose a lot of time.
|
|
* 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
|
|
* Adapt DOM selectors
* Refactore dialog XMLs to have odoo styling
* New editor options (background-position, ...)
* Various improvements
|
|
|
|
|
|
odoo javascript module
related to #9284
opw-653061
opw-653167
|
|
|
|
all() not contains all html matched tags
|
|
|
|
|
|
It seems this.BuildingBlock was changed to this.buildingBlock
by 8c559044a5e1be111dcb577ad7e5ab462c1002a0. Care should be
taken when forward porting code using this.BuildingBlock.
|