[IMP] note: tags in header for form view

bzr revid: chm@openerp.com-20120919083201-q1vfazurar2kjcew
This commit is contained in:
Christophe Matthieu 2012-09-19 10:32:01 +02:00
parent a3351d5d0f
commit fd4f57e037
3 changed files with 16 additions and 5 deletions

View File

@ -531,6 +531,11 @@
.openerp .oe_tags.oe_inline {
min-width: 250px;
}
.openerp .oe_form header .oe_tags {
margin:5px 0 0 5px;
width:400px;
padding-bottom:0;
}
.openerp .oe_tags .text-wrap {
width: 100% !important;
}
@ -1914,7 +1919,7 @@
}
.openerp .oe_form_nosheet > header {
margin: -16px -16px 0 -16px;
padding: 8px;
padding: 0;
}
.openerp .oe_form_sheetbg {
padding: 8px 0;

View File

@ -470,6 +470,12 @@ $sheet-max-width: 860px
text-decoration: none
margin-bottom: 1px
// }}}
.oe_form
header
.oe_tags
margin:5px 0 0 5px
width:400px
padding-bottom:0
// Tooltips {{{
&.oe_tooltip
font-size: 12px
@ -1520,7 +1526,7 @@ $sheet-max-width: 860px
margin: 16px
> header
margin: -16px -16px 0 -16px
padding: 8px
padding: 0
.oe_form_sheetbg
padding: 8px 0
.oe_form_sheet_width

View File

@ -130,7 +130,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
case 'field':
if(this.fields_view.fields[ node.attrs['name'] ].type == 'many2many'){
node.tag = 'div';
node.attrs['class'] = 'oe_kanban_many2many_tags';
node.attrs['class'] = 'oe_form_field oe_tags';
node.attrs['model'] = this.fields_view.fields[node.attrs['name']].relation;
node.attrs['t-att-data'] = 'record.' + node.attrs['name'] + '.raw_value';
}else {
@ -182,7 +182,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
var self=this,
arg={};
// select all widget
self.$el.find(".oe_kanban_many2many_tags").each(function(){
self.$el.find(".oe_form_field.oe_tags").each(function(){
var model = $(this).attr("model");
if(model.length){
var data = $(this).attr("data");
@ -196,7 +196,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
// only one request by model
for(var model in arg){
if(arg[model].length>0){
var block = self.$el.find(".oe_kanban_many2many_tags[model='" + model + "']");
var block = self.$el.find(".oe_form_field.oe_tags[model='" + model + "']");
var dataset = new instance.web.DataSetSearch(self, model, self.session.context);
dataset.name_get(_.uniq( arg[model] )).then(
function(result) {