[IMP] mail_group: improved form view (as small as possible in form view; details visible only in editable mode).

bzr revid: tde@openerp.com-20120606143125-qrmtypr0ve5xguru
This commit is contained in:
Thibault Delavallée
2012-06-06 16:31:25 +02:00
parent 4a2e5d81b0
commit 3be1f8ea01
2 changed files with 19 additions and 15 deletions
+7 -15
View File
@@ -52,26 +52,24 @@
<field name="arch" type="xml">
<form string="Group Form" layout="manual">
<sheet layout="auto" class="openerp_mail_group_sheet">
<group colspan="4" col="4">
<group colspan="4" col="8">
<group colspan="1" col="2">
<field name="photo" widget='image' nolabel="1" on_change="onchange_photo(photo)"/>
</group>
<group colspan="3" col="6">
<group colspan="7" col="6">
<h2><field name="name" nolabel="1" colspan="4"/></h2>
<newline/>
<group colspan="2" col="2">
<group colspan="4" col="4">
<field name="description" colspan="4" nolabel="1"/>
</group>
<group colspan="2" col="2" class="oe_form_readonly_hidden">
<field name="responsible_id" colspan="2"/>
<field name="public" colspan="2"/>
<field name="push_to_groups" colspan="2" attrs="{'invisible':[('groups','=',False)]}"/>
</group>
<group colspan="4" col="4">
<field name="description" colspan="4" nolabel="1"/>
</group>
</group>
</group>
<p><a href="#" class="oe_mail_group_advanced">See advanced options for groups</a></p>
<newline/>
<div class="oe_mail_group_advanced_details">
<div class="oe_form_readonly_hidden">
<group colspan="4" col="4">
<group colspan="2" col="3">
<h3>Models for automatic message fetching</h3>
@@ -91,12 +89,6 @@
</group>
</group>
</div>
<script>
$('a.oe_mail_group_advanced').click(function() {
var parent_node = ($(this)).parents('.oe_form_sheet').eq(0);
parent_node.find('div.oe_mail_group_advanced_details').toggle();
});
</script>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"
+12
View File
@@ -14,8 +14,20 @@ div.oe_mail_group_advanced_details {
.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_sheet {
min-height: 0px;
max-height: none;
padding: 0px 18px;
max-width: 80%;
}
/* Resize group logo */
.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_image > img {
max-width: 100px;
max-height: 100px;
}
/* Resize group description */
.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_text > textarea {
height: 40px;
}
/* ------------------------------ */
/* Group Kanban */