Restyling of the dashboard
bzr revid: mit@openerp.com-20120809134612-lt4l62nzezlfbkgq
This commit is contained in:
@@ -1881,7 +1881,7 @@
|
||||
width: auto;
|
||||
}
|
||||
.openerp .oe_form_nosheet {
|
||||
margin: 20px;
|
||||
margin: 8px;
|
||||
}
|
||||
.openerp .oe_form_nosheet > header {
|
||||
margin-top: -20px;
|
||||
|
||||
@@ -1450,7 +1450,7 @@ $sheet-max-width: 860px
|
||||
.oe_form .oe_form_field_date
|
||||
width: auto
|
||||
.oe_form_nosheet
|
||||
margin: 20px
|
||||
margin: 8px
|
||||
.oe_form_nosheet > header
|
||||
margin-top: -20px
|
||||
margin-left: -20px
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,74 @@
|
||||
@import "base.sass"
|
||||
.openerp
|
||||
.oe_dashboard_links
|
||||
text-align: right
|
||||
margin: 0 4px 6px 0
|
||||
.oe_dashboard
|
||||
width: 100%
|
||||
.oe_action
|
||||
margin: 0 8px 8px 0
|
||||
background-color: white
|
||||
border: 1px solid
|
||||
border-color: #e5e5e5 #dbdbdb #d2d2d2
|
||||
@include radius(3px)
|
||||
@include box-shadow(0 0 2px rgba(0,0,0,0.2))
|
||||
.oe_header
|
||||
font-size: 16px
|
||||
vertical-align: middle
|
||||
margin: 0
|
||||
padding: 12px
|
||||
@include radius(3px 3px 0 0)
|
||||
|
||||
//border-bottom: 1px dotted #dbdbdb
|
||||
//@include radius(2px 2px 0 0)
|
||||
//@include vertical-gradient(#FCFCFC, #DEDEDE)
|
||||
&:hover
|
||||
cursor: move
|
||||
.oe_icon
|
||||
float: right
|
||||
cursor: pointer
|
||||
color: #b3b3b3
|
||||
&:hover
|
||||
color: #666
|
||||
text-decoration: none
|
||||
.oe_close:after
|
||||
content: "×"
|
||||
margin-left: 4px
|
||||
.oe_minimize:after
|
||||
content: "-"
|
||||
margin-left: 4px
|
||||
.oe_maximize:after
|
||||
content: "+"
|
||||
margin-left: 4px
|
||||
.oe_header_empty
|
||||
padding-top: 0
|
||||
padding-bottom: 2px
|
||||
.oe_button_create
|
||||
margin-left: 4px
|
||||
padding: 0 4px 0 4px
|
||||
height: 16px !important
|
||||
//.oe_rename
|
||||
//float: left
|
||||
//padding-right: 4px
|
||||
//position: relative
|
||||
//top: 1px
|
||||
//.oe_input
|
||||
//height: 16px;
|
||||
//position: relative;
|
||||
//top: 2px;
|
||||
//.ui-sortable-placeholder
|
||||
//border: 1px dotted black;
|
||||
//visibility: visible !important;
|
||||
//height: 50px !important;
|
||||
//*
|
||||
//visibility: hidden;
|
||||
.oe_content
|
||||
padding: 0 12px 12px 12px
|
||||
.oe_view_manager_header
|
||||
display: none
|
||||
.oe_list_content
|
||||
> thead
|
||||
border-bottom: 1px
|
||||
> tbody
|
||||
tr:nth-child(odd)
|
||||
background: transparent
|
||||
@@ -20,7 +20,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
|
||||
this.$element.find('.oe_dashboard_column').sortable({
|
||||
connectWith: '.oe_dashboard_column',
|
||||
handle: '.oe_dashboard_action_header',
|
||||
handle: '.oe_header',
|
||||
scroll: false
|
||||
}).disableSelection().bind('sortstop', self.do_save_dashboard);
|
||||
|
||||
@@ -28,8 +28,8 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
this.$element.find('.oe_dashboard_link_reset').click(this.on_reset);
|
||||
this.$element.find('.oe_dashboard_link_change_layout').click(this.on_change_layout);
|
||||
|
||||
this.$element.delegate('.oe_dashboard_column .oe_dashboard_fold', 'click', this.on_fold_action);
|
||||
this.$element.delegate('.oe_dashboard_column .ui-icon-closethick', 'click', this.on_close_action);
|
||||
this.$element.delegate('.oe_dashboard_column .oe_fold', 'click', this.on_fold_action);
|
||||
this.$element.delegate('.oe_dashboard_column .oe_close', 'click', this.on_close_action);
|
||||
|
||||
// Init actions
|
||||
_.each(this.node.children, function(column, column_index) {
|
||||
@@ -80,7 +80,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
var $last_column = $();
|
||||
$dashboard.find('.oe_dashboard_column').each(function(k, v) {
|
||||
if (k >= nlayout) {
|
||||
$(v).find('.oe_dashboard_action').appendTo($last_column);
|
||||
$(v).find('.oe_action').appendTo($last_column);
|
||||
} else {
|
||||
$last_column = $(v);
|
||||
}
|
||||
@@ -93,20 +93,20 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
},
|
||||
on_fold_action: function(e) {
|
||||
var $e = $(e.currentTarget),
|
||||
$action = $e.parents('.oe_dashboard_action:first'),
|
||||
$action = $e.parents('.oe_action:first'),
|
||||
id = parseInt($action.attr('data-id'), 10);
|
||||
if ($e.is('.ui-icon-minusthick')) {
|
||||
if ($e.is('.oe_minimize')) {
|
||||
$action.data('action_attrs').fold = '1';
|
||||
} else {
|
||||
delete($action.data('action_attrs').fold);
|
||||
}
|
||||
$e.toggleClass('ui-icon-minusthick ui-icon-plusthick');
|
||||
$action.find('.oe_dashboard_action_content').toggle();
|
||||
$e.toggleClass('oe_minimize oe_maximize');
|
||||
$action.find('.oe_content').toggle();
|
||||
this.do_save_dashboard();
|
||||
},
|
||||
on_close_action: function(e) {
|
||||
if (confirm(_t("Are you sure you want to remove this item ?"))) {
|
||||
$(e.currentTarget).parents('.oe_dashboard_action:first').remove();
|
||||
$(e.currentTarget).parents('.oe_action:first').remove();
|
||||
this.do_save_dashboard();
|
||||
}
|
||||
},
|
||||
@@ -119,7 +119,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
};
|
||||
this.$element.find('.oe_dashboard_column').each(function() {
|
||||
var actions = [];
|
||||
$(this).find('.oe_dashboard_action').each(function() {
|
||||
$(this).find('.oe_action').each(function() {
|
||||
var action_id = $(this).attr('data-id'),
|
||||
new_attrs = _.clone($(this).data('action_attrs'));
|
||||
if (new_attrs.domain) {
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
</table>
|
||||
</t>
|
||||
<t t-name="DashBoard.action">
|
||||
<div t-att-data-id="action.attrs.name" class="oe_dashboard_action">
|
||||
<h2 t-attf-class="oe_dashboard_action_header #{action.attrs.string ? '' : 'oe_dashboard_action_header_empty'}">
|
||||
<div t-att-data-id="action.attrs.name" class="oe_action">
|
||||
<h2 t-attf-class="oe_header #{action.attrs.string ? '' : 'oe_header_empty'}">
|
||||
<t t-esc="action.attrs.string"/>
|
||||
<t t-if="!action.attrs.string">&nbsp;</t>
|
||||
<button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_dashboard_button_create">Create</button>
|
||||
<span class='ui-icon ui-icon-closethick'></span>
|
||||
<span class='ui-icon ui-icon-minusthick oe_dashboard_fold' t-if="!action.attrs.fold"></span>
|
||||
<span class='ui-icon ui-icon-plusthick oe_dashboard_fold' t-if="action.attrs.fold"></span>
|
||||
<button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_button_create">Create</button>
|
||||
<span class='oe_icon oe_close'></span>
|
||||
<span class='oe_icon oe_minimize oe_fold' t-if="!action.attrs.fold"></span>
|
||||
<span class='oe_icon oe_maximize oe_fold' t-if="action.attrs.fold"></span>
|
||||
</h2>
|
||||
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe_dashboard_action_content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
|
||||
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe_content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="DashBoard.layouts">
|
||||
|
||||
Reference in New Issue
Block a user