Browse Source

Fix white background when reordering tile

pull/868/head
Iván Todorovich 7 years ago
committed by Sylvain LE GAL
parent
commit
5d88830c1a
  1. 2
      web_dashboard_tile/README.rst
  2. 16
      web_dashboard_tile/static/src/css/tile.css
  3. 4
      web_dashboard_tile/views/tile.xml

2
web_dashboard_tile/README.rst

@ -31,9 +31,7 @@ Usage
Known issues Known issues
============ ============
* Reordering the Kanban Tile will result in a rendering bug where the tile loses it's `style` attribute, where the `background-color` is set, rendering the tile background as white. Refreshing the view solves it.
* Can not edit color from dashboard * Can not edit color from dashboard
* Can not edit sequence from dashboard
* Original context is ignored. * Original context is ignored.
* Original domain and filter are not restored. * Original domain and filter are not restored.
* To preserve a relative date domain, you have to manually edit the tile's domain from `Configuration > User Interface > Dashboard Tile`. You can use the same variables available in filters (`uid`, `context_today()`, `current_date`, `time`, `datetime`, `relativedelta`). * To preserve a relative date domain, you have to manually edit the tile's domain from `Configuration > User Interface > Dashboard Tile`. You can use the same variables available in filters (`uid`, `context_today()`, `current_date`, `time`, `datetime`, `relativedelta`).

16
web_dashboard_tile/static/src/css/tile.css

@ -1,17 +1,15 @@
/* custom kanban style */ /* custom kanban style */
.o_kanban_view .oe_dashboard_tile { .o_kanban_view .oe_dashboard_tile {
width: 150px;
height: 150px; height: 150px;
} }
.o_kanban_view.o_kanban_ungrouped .o_kanban_record.oe_dashboard_tile {
/* override max-width rules */
margin: 4px !important;
/* flex width */
-ms-flex: 1 1 150px;
-moz-flex: 1 1 150px;
-webkit-flex: 1 1 150px;
flex: 1 1 150px;
/* Fix bug where draggin a tile results in the element losing its style */
.o_kanban_view .oe_dashboard_tile {
padding: 0px !important;
}
.o_kanban_view .oe_dashboard_tile .tile_background {
padding: 8px;
height: 100%;
} }
.o_kanban_view .oe_dashboard_tile .tile_label, .o_kanban_view .oe_dashboard_tile .tile_label,

4
web_dashboard_tile/views/tile.xml

@ -108,7 +108,8 @@
<templates> <templates>
<t t-name="kanban-box"> <t t-name="kanban-box">
<div t-attf-class="oe_dashboard_tile oe_kanban_global_click" t-attf-style="background-color:#{record.background_color.raw_value}" >
<div class="oe_dashboard_tile oe_kanban_global_click">
<div class="tile_background" t-attf-style="background-color:#{record.background_color.raw_value}">
<div class="o_dropdown_kanban dropdown" groups="base.group_no_one"> <div class="o_dropdown_kanban dropdown" groups="base.group_no_one">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#"> <a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
@ -141,6 +142,7 @@
</div> </div>
<div class="oe_clear"></div> <div class="oe_clear"></div>
</div> </div>
</div>
</t> </t>
</templates> </templates>
</kanban> </kanban>

Loading…
Cancel
Save