diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-11-17 13:14:02 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-01-16 20:49:19 +0100 |
| commit | 32b8cec5361174c92c45a4975d4e02f1fb448aa2 (patch) | |
| tree | 110bd6986c2da1ed5047002b7ea40c91ea9fa5ed /addons/web/static/src/less | |
| parent | 9bee25a9df65f657fef0f2f32a7ad823fdc7d4e1 (diff) | |
[REF] web,*: ActionManager/ViewManager refactoring
This rev. is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.
The main changes are:
- there is no ViewManager anymore, its work is now handled by the
ActionManager itself, but isolated in a specific file ; this
eases a lot of things, as the breadcrumbs handling for example.
- the ActionManager code is converted to the new coding principles
and guidelines ; mainly, children widgets communicate with it by
triggering events up, and not by function calls anymore.
- the ActionManager layer is now testable, and a lot of tests have
already been written.
- the code in other addons has been adapted consequently.
What's coming next:
- introduce the 'AbstractAction' Widget, and make client actions
and view controllers inherit from it ; this widget will
implement a common API that could be used uniformly by the
ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
getTitle()...).
- move the ControlPanel handling from the ActionManager to the
AbstractAction.
Diffstat (limited to 'addons/web/static/src/less')
| -rw-r--r-- | addons/web/static/src/less/fields.less | 2 | ||||
| -rw-r--r-- | addons/web/static/src/less/form_view.less | 2 | ||||
| -rw-r--r-- | addons/web/static/src/less/graph_view.less | 2 | ||||
| -rw-r--r-- | addons/web/static/src/less/modal.less | 4 | ||||
| -rw-r--r-- | addons/web/static/src/less/pivot_view.less | 1 | ||||
| -rw-r--r-- | addons/web/static/src/less/views.less | 3 | ||||
| -rw-r--r-- | addons/web/static/src/less/webclient_layout.less | 7 |
7 files changed, 3 insertions, 18 deletions
diff --git a/addons/web/static/src/less/fields.less b/addons/web/static/src/less/fields.less index 3c6428e5c75..e8bf81c9448 100644 --- a/addons/web/static/src/less/fields.less +++ b/addons/web/static/src/less/fields.less @@ -33,7 +33,7 @@ } // Block fields - &.note-editor, &.oe_form_field_html, &.oe_form_field_html_text, &.oe_form_field_text, &.o_view_manager_content, &.o_field_domain, &.o_graph_linechart, &.o_graph_barchart { + &.note-editor, &.oe_form_field_html, &.oe_form_field_html_text, &.oe_form_field_text, &.o_field_domain, &.o_graph_linechart, &.o_graph_barchart { display: block; } diff --git a/addons/web/static/src/less/form_view.less b/addons/web/static/src/less/form_view.less index 36002ace912..8a053a8cca3 100644 --- a/addons/web/static/src/less/form_view.less +++ b/addons/web/static/src/less/form_view.less @@ -431,7 +431,7 @@ // One2Many, Many2Many outside of group .o_field_widget { - &.o_view_manager_content, &.o_field_one2many, &.o_field_many2many { + &.o_field_one2many, &.o_field_many2many { width: 100%; > div { width: 100%; diff --git a/addons/web/static/src/less/graph_view.less b/addons/web/static/src/less/graph_view.less index f77b4faa9d0..fc8fc323582 100644 --- a/addons/web/static/src/less/graph_view.less +++ b/addons/web/static/src/less/graph_view.less @@ -1,6 +1,4 @@ .o_graph { - height: 100%; - .o_graph_svg_container { height: 100%; overflow: auto; diff --git a/addons/web/static/src/less/modal.less b/addons/web/static/src/less/modal.less index a223deb55ef..5b74583ee41 100644 --- a/addons/web/static/src/less/modal.less +++ b/addons/web/static/src/less/modal.less @@ -23,10 +23,6 @@ float: right; } } - - .o_view_manager_content { - position: static; // Reset position for view managers in modals (default value: absolute) - } } .modal-footer { diff --git a/addons/web/static/src/less/pivot_view.less b/addons/web/static/src/less/pivot_view.less index 2fa6e1a6f44..d7dfdd45de5 100644 --- a/addons/web/static/src/less/pivot_view.less +++ b/addons/web/static/src/less/pivot_view.less @@ -1,5 +1,4 @@ .o_pivot { - height: 100%; overflow: auto; // Inform the user that he may click on a cell to be redirected to a list view of the diff --git a/addons/web/static/src/less/views.less b/addons/web/static/src/less/views.less index ee82aa5d9e5..48117cb1b75 100644 --- a/addons/web/static/src/less/views.less +++ b/addons/web/static/src/less/views.less @@ -4,9 +4,6 @@ */ // No content helper -.o_view_manager_content > div { - height: 100%; -} .oe_view_nocontent { a { cursor: pointer; diff --git a/addons/web/static/src/less/webclient_layout.less b/addons/web/static/src/less/webclient_layout.less index b389a919a1e..f876d8b3527 100644 --- a/addons/web/static/src/less/webclient_layout.less +++ b/addons/web/static/src/less/webclient_layout.less @@ -155,14 +155,9 @@ overflow: auto; position: relative; - .o_view_manager_content { + > .o_view_controller { .o-position-absolute(0, 0, 0, 0); // Get the 100% height of its flex parent height: 100%; - - .o_view_manager_content { - position: static; // Reset position for nested view managers - height: auto; // reset height inheritance for nested view managers - } } } } |
