[IMP] Dashboard: improved layout

bzr revid: fme@openerp.com-20110714144627-ldyh2kpv64h08c1j
This commit is contained in:
Fabien Meghazi 2011-07-14 16:46:27 +02:00
parent 55f5cf3eff
commit 29bea06250
3 changed files with 24 additions and 11 deletions

View File

@ -7,14 +7,17 @@
}
.openerp .oe-dashboard-action {
margin: 0 0.5em 0.5em 0;
padding: 2px;
}
.openerp .oe-dashboard-action:hover {
border: 1px dashed #ccc;
padding: 1px;
}
.openerp .oe-dashboard-action .oe-dashboard-action-header {
margin: 0.3em;
padding-bottom: 4px;
padding-left: 0.2em
font-size: 125%;
}
.openerp a.oe-dashboard-action-rename {
float: left;
padding-right: 4px;
position: relative;
top: 1px;
@ -43,7 +46,7 @@
}
.openerp .oe-dashboard-action .oe-dashboard-action-content {
padding: 0.4em;
/*padding: 0.4em;*/
}
.openerp .oe-dashboard .ui-sortable-placeholder {
@ -126,3 +129,10 @@
top: 0px;
right: 0px;
}
.openerp .oe-dashboard-action .view-manager-main-content {
padding: 2px;
}
.openerp .oe-dashboard-action-header .ui-icon, .openerp .oe-dashboard-action-header .oe-dashboard-action-rename {
display: none;
}

View File

@ -40,7 +40,10 @@ openerp.base.form.DashBoard = openerp.base.form.Widget.extend({
});
});
this.$element.find('a.oe-dashboard-action-rename').live('click', this.on_rename);
//this.$element.find('a.oe-dashboard-action-rename').live('click', this.on_rename);
this.$element.find('.oe-dashboard-action').live('mouseover mouseout', function(event) {
$(this).find('.oe-dashboard-action-header .ui-icon, .oe-dashboard-action-header .oe-dashboard-action-rename').toggle(event.type == 'mouseover');
});
},
on_undo: function() {
this.rpc('/base/view/undo_custom', {

View File

@ -29,15 +29,15 @@
</table>
</t>
<t t-name="DashBoard.action">
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
<div class="oe-dashboard-action-header ui-widget-header ui-corner-all">
<a href="#" class="oe-dashboard-action-rename"><img src="/base/static/src/img/icons/gtk-edit.png" width="16" height="16"/></a>
<span class="oe-dashboard-action-title"><t t-esc="action.attrs.string"/></span>
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
<h2 class="oe-dashboard-action-header oe_view_title">
<t t-esc="action.attrs.string"/>
<!--<a href="#" class="oe-dashboard-action-rename"><img src="/base/static/src/img/icons/gtk-edit.png" width="16" height="16"/></a>-->
<input class="oe-dashboard-action-input" type="text" name="title" value="" style="display: none"/>
<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>
</div>
</h2>
<div t-att-id="view.element_id + '_action_' + action.attrs.name" class="oe-dashboard-action-content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
</div>
</t>