[IMP] merge trunk-mit

bzr revid: fp@tinyerp.com-20120705123643-2th1ioqj4oltpgt9
This commit is contained in:
Fabien Pinckaers 2012-07-05 14:36:43 +02:00
commit 778e18d42f
4 changed files with 19 additions and 17 deletions

View File

@ -289,7 +289,7 @@
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">i</span>
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li><a type="edit" >Edit...</a></li>
<li><a type="delete">Delete</a></li>
@ -311,18 +311,14 @@
<field name="partner_id"/>
</div>
<div style="padding-left: 0.5em">
<i>
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<span t-attf-class="#{red || ''}">
<field name="date_action"/>
</span>
<t t-if="record.date_action.raw_value"> : </t>
<field name="title_action"/>
</i>
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<span t-attf-class="#{red || ''}"><field name="date_action"/></span>
<t t-if="record.date_action.raw_value"> : </t>
<field name="title_action"/>
</div>
<div class="oe_right">
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.7; filter:alpha(opacity=70);"/>
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
<!--
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kaban_status_red</t>
<span t-attf-class="oe_kanban_status #{red}"> </span>

View File

@ -91,7 +91,7 @@ openerp.mail = function(session) {
this.params = params;
this.params.parent_id = this.params.parent_id || false;
this.params.thread_level = this.params.thread_level || 0;
this.params.msg_more_limit = this.params.msg_more_limit || 100;
this.params.msg_more_limit = this.params.msg_more_limit || 290;
this.params.limit = this.params.limit || 100;
this.params.offset = this.params.offset || 0;
this.params.records = this.params.records || null;
@ -304,7 +304,6 @@ openerp.mail = function(session) {
// format date according to the user timezone
record.date = session.web.format_value(record.date, {type:"datetime"});
var rendered = session.web.qweb.render('mail.Thread.message', {'record': record, 'thread': this, 'params': this.params, 'display': this.display});
$(rendered).appendTo(this.$element.children('div.oe_mail_thread_display:first'));
// expand feature
@ -635,6 +634,7 @@ openerp.mail = function(session) {
start: function () {
this._super.apply(this, arguments);
var self = this;
this.display_current_user();
// add events
this.add_event_handlers();
// load mail.message search view
@ -694,6 +694,14 @@ openerp.mail = function(session) {
});
},
display_current_user: function () {
return this.$element.find('img.oe_mail_msg_image').attr('src', this.thread_get_avatar('res.users', 'avatar', this.session.uid));
},
thread_get_avatar: function(model, field, id) {
return this.session.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + (id || '');
},
/**
* Initializes the wall and calls fetch_comments
* @param {Number} limit: number of notifications to fetch

View File

@ -56,9 +56,7 @@
<div t-name="mail.Thread" class="oe_mail oe_mail_thread">
<div class="oe_mail_thread_action">
<img class="oe_mail_msg_image oe_left" alt="User img"/>
<div class="oe_mail_msg_content">
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/>
</div>
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/>
</div>
<div class="oe_mail_thread_display"></div>
<div class="oe_mail_thread_more">

View File

@ -239,7 +239,7 @@
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_auto_height oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">i</span>
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li><a type="edit">Edit...</a></li>
<li><a type="delete">Delete</a></li>