[IMP] dashbaords layouts
bzr revid: fp@tinyerp.com-20120918172346-tcgjtvovvkbrbrvx
This commit is contained in:
commit
9607289874
|
@ -1,3 +1,36 @@
|
|||
.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_0 {
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_1, .openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_2 {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column {
|
||||
width: 50%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column.index_2 {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-1-1 .oe_dashboard_column {
|
||||
width: 33%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_0 {
|
||||
width: 70%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_1 {
|
||||
width: 30%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_2 {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_0 {
|
||||
width: 30%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_1 {
|
||||
width: 70%;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_2 {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_dashboard_layout_selector ul {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,31 @@
|
|||
box-shadow: $bsval
|
||||
|
||||
.openerp
|
||||
.oe_dashboard_layout_1 .oe_dashboard_column
|
||||
&.index_0
|
||||
width: 100%
|
||||
&.index_1, &.index_2
|
||||
display: none
|
||||
.oe_dashboard_layout_1-1 .oe_dashboard_column
|
||||
width: 50%
|
||||
&.index_2
|
||||
display: none
|
||||
.oe_dashboard_layout_1-1-1 .oe_dashboard_column
|
||||
width: 33%
|
||||
.oe_dashboard_layout_2-1 .oe_dashboard_column
|
||||
&.index_0
|
||||
width: 70%
|
||||
&.index_1
|
||||
width: 30%
|
||||
&.index_2
|
||||
display: none
|
||||
.oe_dashboard_layout_1-2 .oe_dashboard_column
|
||||
&.index_0
|
||||
width: 30%
|
||||
&.index_1
|
||||
width: 70%
|
||||
&.index_2
|
||||
display: none
|
||||
.oe_dashboard_layout_selector
|
||||
ul
|
||||
white-space: nowrap
|
||||
|
@ -98,3 +123,4 @@
|
|||
> tbody
|
||||
tr:nth-child(odd)
|
||||
background: transparent
|
||||
|
||||
|
|
|
@ -24,6 +24,10 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
|||
scroll: false
|
||||
}).bind('sortstop', self.do_save_dashboard);
|
||||
|
||||
var old_title = this.__parentedParent.get('title');
|
||||
this.__parentedParent.on_record_loaded.add_last(function(){
|
||||
self.__parentedParent.set({ 'title' : old_title});
|
||||
});
|
||||
// Events
|
||||
this.$el.find('.oe_dashboard_link_reset').click(this.on_reset);
|
||||
this.$el.find('.oe_dashboard_link_change_layout').click(this.on_change_layout);
|
||||
|
@ -165,8 +169,6 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
|||
this.rpc('/web/view/add_custom', {
|
||||
view_id: this.view.fields_view.view_id,
|
||||
arch: arch
|
||||
}, function() {
|
||||
self.$el.find('.oe_dashboard_link_reset').show();
|
||||
});
|
||||
},
|
||||
on_load_action: function(result, index, action_attrs) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<t t-name="DashBoard">
|
||||
<div class="oe_dashboard_links">
|
||||
<button type="button" class="button oe_dashboard_link_reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
|
||||
<button type="button" class="button oe_dashboard_link_reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id || session.debug ? null : 'display: none'">
|
||||
<img src="/board/static/src/img/layout_2-1.png" width="16" height="16"/>
|
||||
<span> Reset </span>
|
||||
</button>
|
||||
|
|
Loading…
Reference in New Issue