[IMP] properly prefix templates names with 'mail.'
use 'main' and 'aside' instead of 'left' and 'right' in the mail main boxes' class names bzr revid: abo@openerp.com-20120621150002-u7saes5bc06bt51l
This commit is contained in:
parent
22a0a0208f
commit
b821d42061
|
@ -9,35 +9,19 @@
|
|||
background: white;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_act {
|
||||
.openerp div.oe_mail_wall_action {
|
||||
padding: 8px;
|
||||
background: #eee;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_act:after {
|
||||
.openerp div.oe_mail_wall_action:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* 2 columns view */
|
||||
.openerp div.oe_mail_wall_left {
|
||||
float: left;
|
||||
width: 560px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_right {
|
||||
margin-left: 565px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_threads {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.openerp textarea.oe_mail_wall_action_textarea {
|
||||
.openerp .oe_mail_wall_action textarea {
|
||||
width: 474px;
|
||||
height: 60px;
|
||||
padding: 4px;
|
||||
|
@ -45,11 +29,31 @@
|
|||
float: right;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_threads textarea {
|
||||
/* 2 columns view */
|
||||
.openerp div.oe_mail_wall_main {
|
||||
float: left;
|
||||
width: 560px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_wall_aside {
|
||||
margin-left: 565px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
/* Threads */
|
||||
.openerp .oe_mail_wall_threads {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.openerp .oe_mail_wall_threads textarea {
|
||||
height: 40px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail_wall_thread:first .oe_mail_msg_notification {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_thread_subthread img {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
|
@ -149,14 +153,14 @@
|
|||
/* ThreadDisplay */
|
||||
/* ------------------------------ */
|
||||
|
||||
.openerp div.oe_mail_thread_act {
|
||||
.openerp div.oe_mail_thread_action {
|
||||
white-space: normal;
|
||||
padding: 8px;
|
||||
background: #eee;
|
||||
border-top: 1px solid #ccc
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.openerp div.oe_mail_thread_act:after {
|
||||
.openerp div.oe_mail_thread_action:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
|
@ -191,13 +195,22 @@
|
|||
clear: both;
|
||||
}
|
||||
|
||||
.openerp .oe_mail_msg_notification, .openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email {
|
||||
.openerp .oe_mail_msg_notification,
|
||||
.openerp .oe_mail_msg_comment,
|
||||
.openerp .oe_mail_msg_email {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email, .openerp .oe_mail_msg_notification {
|
||||
.openerp .oe_mail_msg_comment,
|
||||
.openerp .oe_mail_msg_email,
|
||||
.openerp .oe_mail_msg_notification {
|
||||
background: white;
|
||||
border-top: 1px solid #ccc
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
.openerp .oe_mail_wall_threads > .oe_mail_wall_thread:first-child > .oe_mail_msg_comment,
|
||||
.openerp .oe_mail_wall_threads > .oe_mail_wall_thread:first-child > .oe_mail_msg_email,
|
||||
.openerp .oe_mail_wall_threads > .oe_mail_wall_thread:first-child > .oe_mail_msg_notification {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.openerp .oe_email_icon {
|
||||
|
@ -209,7 +222,9 @@
|
|||
background: #eee;
|
||||
}
|
||||
|
||||
.openerp .oe_mail_msg_notification:after, .openerp .oe_mail_msg_comment:after, .openerp .oe_mail_msg_email:after {
|
||||
.openerp .oe_mail_msg_notification:after,
|
||||
.openerp .oe_mail_msg_comment:after,
|
||||
.openerp .oe_mail_msg_email:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
|
|
|
@ -72,7 +72,7 @@ openerp.mail = function(session) {
|
|||
* either it will fetch [limit] messages related to [res_model]:[res_id].
|
||||
*/
|
||||
mail.Thread = session.web.Widget.extend({
|
||||
template: 'Thread',
|
||||
template: 'mail.Thread',
|
||||
|
||||
/**
|
||||
* @param {Object} parent parent
|
||||
|
@ -122,7 +122,7 @@ openerp.mail = function(session) {
|
|||
this._super.apply(this, arguments);
|
||||
// customize display
|
||||
if (! this.display.show_post_comment) {
|
||||
this.$element.find('div.oe_mail_thread_act').hide();
|
||||
this.$element.find('div.oe_mail_thread_action').hide();
|
||||
}
|
||||
// add events
|
||||
this.add_events();
|
||||
|
@ -171,7 +171,7 @@ openerp.mail = function(session) {
|
|||
});
|
||||
// event: click on 'reply' in msg
|
||||
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_reply', 'click', function (event) {
|
||||
var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_act:first');
|
||||
var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_action:first');
|
||||
act_dom.toggle();
|
||||
event.preventDefault();
|
||||
});
|
||||
|
@ -184,7 +184,7 @@ openerp.mail = function(session) {
|
|||
var call_defer = self.ds_msg.unlink([parseInt(msg_id)]);
|
||||
$(event.srcElement).parents('.oe_mail_thread_msg').eq(0).hide();
|
||||
if (self.params.thread_level > 0) {
|
||||
$(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide();
|
||||
$(event.srcElement).parents('.oe_mail_thread').eq(0).hide();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
@ -539,7 +539,7 @@ openerp.mail = function(session) {
|
|||
/* ThreadView widget: thread of comments */
|
||||
mail.RecordThread = session.web.form.AbstractField.extend({
|
||||
// QWeb template to use when rendering the object
|
||||
template: 'RecordThread',
|
||||
template: 'mail.RecordThread',
|
||||
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
|
@ -581,7 +581,7 @@ openerp.mail = function(session) {
|
|||
this._super.apply(this, arguments);
|
||||
var self = this;
|
||||
this.reinit();
|
||||
if (! this.view.datarecord.id) { this.$element.find('ul.oe_mail_thread').hide(); return; }
|
||||
if (! this.view.datarecord.id) { this.$element.find('.oe_mail_thread').hide(); return; }
|
||||
// fetch followers
|
||||
var fetch_sub_done = this.fetch_subscribers();
|
||||
// create and render Thread widget
|
||||
|
@ -645,7 +645,7 @@ openerp.mail = function(session) {
|
|||
|
||||
/* WallView widget: a wall of messages */
|
||||
mail.WallView = session.web.Widget.extend({
|
||||
template: 'Wall',
|
||||
template: 'mail.Wall',
|
||||
|
||||
/**
|
||||
* @param {Object} parent parent
|
||||
|
@ -695,7 +695,7 @@ openerp.mail = function(session) {
|
|||
add_event_handlers: function () {
|
||||
var self = this;
|
||||
// post a comment
|
||||
this.$element.find('button.oe_mail_wall_button_comment').click(function () { return self.do_comment(); });
|
||||
this.$element.find('.oe_mail_wall_action button').click(function () { return self.do_comment(); });
|
||||
// display more threads
|
||||
this.$element.find('button.oe_mail_wall_button_more').click(function () { return self.do_more(); });
|
||||
},
|
||||
|
@ -781,7 +781,7 @@ openerp.mail = function(session) {
|
|||
var records = self.comments_structure.tree_struct[root_id]['for_thread_msgs'];
|
||||
var model_name = self.comments_structure.msgs[root_id]['model'];
|
||||
var res_id = self.comments_structure.msgs[root_id]['res_id'];
|
||||
var render_res = session.web.qweb.render('WallThreadContainer', {});
|
||||
var render_res = session.web.qweb.render('mail.WallThreadContainer', {});
|
||||
$('<li class="oe_mail_wall_thread">').html(render_res).appendTo(self.$element.find('ul.oe_mail_wall_threads'));
|
||||
var thread = new mail.Thread(self, {
|
||||
'res_model': model_name, 'res_id': res_id, 'uid': self.session.uid, 'records': records,
|
||||
|
@ -835,7 +835,7 @@ openerp.mail = function(session) {
|
|||
|
||||
/** Action: Posts a comment */
|
||||
do_comment: function () {
|
||||
var comment_node = this.$element.find('textarea.oe_mail_wall_action_textarea');
|
||||
var comment_node = this.$element.find('.oe_mail_wall_action textarea');
|
||||
var body_text = comment_node.val();
|
||||
comment_node.val('');
|
||||
var call_done = this.ds_users.call('message_append_note', [[this.session.uid], 'Tweet', body_text, false, 'comment', 'html']).then(this.proxy('init_and_fetch_comments'));
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template>
|
||||
|
||||
<div t-name="Wall" class="oe_mail_wall">
|
||||
<div t-name="mail.Wall" class="oe_mail_wall">
|
||||
<table class="oe_view_manager_header">
|
||||
<tr class="oe_header_row">
|
||||
<td><h2 class="oe_view_title">All Feeds</h2></td>
|
||||
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="oe_mail_wall_left">
|
||||
<div class="oe_mail_wall_act">
|
||||
<div class="oe_mail_wall_main">
|
||||
<div class="oe_mail_wall_action">
|
||||
<img class="oe_mail_msg_image oe_left" alt="User img"/>
|
||||
<textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="What are you working on?"/>
|
||||
<button class="oe_right oe_mail_wall_button_comment" type="button">Post comment</button>
|
||||
|
@ -21,13 +21,13 @@
|
|||
<button class="oe_mail_wall_button_more" type="button">See more discussions</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_mail_wall_right"></div>
|
||||
<div class="oe_mail_wall_aside"></div>
|
||||
</div>
|
||||
|
||||
<t t-name="WallThreadContainer">
|
||||
<t t-name="mail.WallThreadContainer">
|
||||
</t>
|
||||
|
||||
<div t-name="RecordThread" class="oe_mail_recthread">
|
||||
<div t-name="mail.RecordThread" class="oe_mail_recthread">
|
||||
<h4>History and Comments</h4>
|
||||
<div class="oe_mail_recthread_left"></div>
|
||||
<div class="oe_mail_recthread_right">
|
||||
|
@ -43,8 +43,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div t-name="Thread" class="oe_mail oe_mail_thread">
|
||||
<div class="oe_mail_thread_act">
|
||||
<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 = '';"/>
|
||||
|
|
Loading…
Reference in New Issue