summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorPurnendu Singh (OpenERP) <psi@tinyerp.com>2012-06-11 18:17:02 +0530
committerPurnendu Singh (OpenERP) <psi@tinyerp.com>2012-06-11 18:17:02 +0530
commit3daedd56c24e9a86d74dedb2b3b04f4d09e3bd32 (patch)
tree88c4f24b3a32cb9afed3c25c32c43fb290e64ba8 /addons/mail/static/src
parent45af06ba68f6329281a5dadb4ed245d0157d8e52 (diff)
parentb2f173d4b2d3cb804111b801868d494eec19756c (diff)
[MERGE] merge with main addons
bzr revid: psi@tinyerp.com-20120611124702-f45l1i7kqzjs7sua
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/css/mail.css116
-rwxr-xr-x[-rw-r--r--]addons/mail/static/src/img/email_icon.pngbin2772 -> 924 bytes
-rw-r--r--addons/mail/static/src/js/mail.js8
-rw-r--r--addons/mail/static/src/xml/mail.xml70
4 files changed, 112 insertions, 82 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index 554f8085fb5..f8975d67b78 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -9,6 +9,12 @@
background: white;
}
+.openerp div.oe_mail_wall_act {
+ padding: 8px;
+ background: #eee;
+ border: 1px solid #ccc;
+}
+
.openerp div.oe_mail_wall_act:after {
content: "";
display: block;
@@ -32,23 +38,38 @@
}
.openerp textarea.oe_mail_wall_action_textarea {
- width: 550px;
+ width: 474px;
height: 60px;
- padding: 5px;
+ padding: 4px;
+ margin-bottom: 8px;
+ float: right;
}
.openerp div.oe_mail_wall_threads textarea {
- height: 20px;
- padding: 2px;
+ height: 40px;
+ padding: 4px;
}
.openerp div.oe_mail_thread_subthread img {
- width: 30px;
- height: 30px;
+ width: 28px;
+ height: 28px;
+}
+
+.openerp div.oe_mail_msg_content {
+ width: 486px;
+}
+
+.openerp div.oe_mail_msg_content p {
+ margin: 4px 0;
+}
+
+.openerp div.oe_mail_msg_content li{
+ float: left;
+ margin-right: 3px;
}
.openerp div.oe_mail_thread_subthread div.oe_mail_msg_content {
- margin-left: 40px;
+ width: 440px;
}
.openerp div.oe_mail_wall_more {
@@ -74,10 +95,16 @@
margin-bottom: 8px;
}
+.openerp div.oe_mail_recthread_followers img.oe_mail_msg_image {
+ width: 28px;
+ height: 28px;
+ margin: 4px;
+}
+
/* RecordThread: 2 columns view */
.openerp div.oe_mail_recthread_left {
float: left;
- width: 55%;
+ width: 560px;
}
.openerp div.oe_mail_recthread_right {
@@ -127,8 +154,9 @@
.openerp div.oe_mail_thread_act {
white-space: normal;
- margin-bottom: 5px;
- padding: 4px;
+ padding: 8px;
+ background: #eee;
+ border-top: 1px solid #ccc
}
.openerp div.oe_mail_thread_act:after {
@@ -142,8 +170,11 @@
}
.openerp div.oe_mail_thread_subthread {
- margin-top: 8px;
- padding-left: 5%;
+ margin-left: 66px;
+}
+
+.openerp div.oe_mail_thread_subthread li.oe_mail_thread_msg:last-child {
+ margin-bottom: 8px;
}
.openerp div.oe_mail_thread_more {
@@ -151,10 +182,6 @@
border-bottom: 1px solid #D2D9E7;
}
-.openerp li.oe_mail_thread_msg {
- padding: 1px;
-}
-
.openerp li.oe_mail_thread_msg:after {
content: "";
display: block;
@@ -168,23 +195,20 @@
}
.openerp .oe_mail_msg_notification, .openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email {
- padding: 4px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -o-border-radius: 4px;
- -ms-border-radius: 4px;
- border-radius: 4px;
+ padding: 8px;
}
-.openerp li.oe_mail_thread_msg > .oe_mail_msg_comment {
- background: #eee;
+.openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email, .openerp .oe_mail_msg_notification {
+ background: white;
+ border-top: 1px solid #ccc
}
-.openerp div.oe_mail_thread_subthread .oe_mail_msg_comment {
- background: white;
+.openerp .oe_email_icon {
+ width: 50px;
+ height: 50px;
}
-.openerp .oe_mail_msg_notification {
+.openerp div.oe_mail_thread_subthread .oe_mail_msg_comment {
background: #eee;
}
@@ -195,7 +219,7 @@
}
.openerp .oe_mail_msg_content {
- margin-left: 60px;
+ float: left;
}
.openerp .oe_mail_msg_content:after {
@@ -205,16 +229,15 @@
}
.openerp img.oe_mail_msg_image {
- margin-right: 8px;
- width: 45px;
- height: 45px;
+ width: 50px;
+ height: 50px;
text-align: center;
overflow: hidden;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -o-border-radius: 4px;
- -ms-border-radius: 4px;
- border-radius: 4px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ -o-border-radius: 3px;
+ -ms-border-radius: 3px;
+ border-radius: 3px;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
-o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
@@ -222,14 +245,6 @@
clip: rect(5px, 40px, 45px, 0px);
}
-.openerp p.oe_mail_msg_p_email_header {
- border-bottom: 1px solid #D2D9E7;
-}
-
-.openerp span.oe_mail_msg_body a.reduce, .openerp span.oe_mail_msg_body_short a.expand {
- color: #4E43E7;
-}
-
/* ------------------------------ */
/* Styling (should be openerp) */
/* ------------------------------ */
@@ -241,11 +256,10 @@
.openerp li.oe_mail {
list-style-type: none;
- margin-bottom: 2px;
}
.openerp input.oe_mail, textarea.oe_mail {
- width: 100%;
+ width: 432px;
padding: 4px;
font-size: 12px;
border: 1px solid #cccccc;
@@ -272,7 +286,7 @@
.openerp p.oe_mail_msg {
padding: 0;
- margin: 0;
+ margin: 0 0 4px 0;
}
.openerp a.oe_mail_oe_intlink {
@@ -283,7 +297,7 @@
font-weight: bold;
}
-.openerp .oe_mail_oe_space {
- margin-left: 15px;
- margin-right: 4px;
-}
+/*.openerp .oe_mail_oe_space:after {*/
+ /*content: " · ";*/
+ /*margin-right: 2px;*/
+/*}*/
diff --git a/addons/mail/static/src/img/email_icon.png b/addons/mail/static/src/img/email_icon.png
index 6390d9e6e69..78c131c0ff2 100644..100755
--- a/addons/mail/static/src/img/email_icon.png
+++ b/addons/mail/static/src/img/email_icon.png
Binary files differ
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 1ec6fe32eb5..905e95f3aef 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -535,13 +535,13 @@ openerp.mail = function(session) {
display_subscribers: function (records) {
var self = this;
this.is_subscriber = false;
- var sub_node = this.$element.find('div.oe_mail_recthread_followers')
- sub_node.empty();
- $('<h4/>').html('Followers (' + records.length + ')').appendTo(sub_node);
+ var user_list = this.$element.find('ul.oe_mail_followers_display').empty();
+ this.$element.find('div.oe_mail_recthread_followers h4').html('Followers (' + records.length + ')');
_(records).each(function (record) {
if (record.id == self.session.uid) { self.is_subscriber = true; }
var mini_url = self.thread_get_avatar('res.users', 'avatar', record.id);
- $('<img class="oe_mail_oe_left oe_mail_msg_image" src="' + mini_url + '" title="' + record.name + '" alt="' + record.name + '"/>').appendTo(sub_node);
+ $('<li><img class="oe_mail_oe_left oe_mail_msg_image" src="' + mini_url + '"/>' +
+ '<a href="#" class="intlink oe_mail_oe_intlink" data-res-model="res.users" data-res-id="' + record.id + '">' + record.name + '</a></li>').appendTo(user_list);
});
if (self.is_subscriber) {
self.$element.find('button.oe_mail_button_follow').hide();
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index 874cd406852..a34e362960b 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -10,6 +10,7 @@
</table>
<div class="oe_mail_wall_left">
<div class="oe_mail_wall_act">
+ <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>
</div>
@@ -38,8 +39,7 @@
</div>
<div class="oe_mail_recthread_followers">
<h4>Followers</h4>
- <div class="oe_mail_followers_display">
- </div>
+ <ul class="oe_mail_followers_display"></ul>
</div>
</div>
</div>
@@ -48,7 +48,7 @@
<div class="oe_mail_thread_act">
<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 = '';"/><br />
+ <textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/>
</div>
</div>
<div class="oe_mail_thread_display"></div>
@@ -59,7 +59,8 @@
<li t-name="ThreadMsg" t-attf-class="oe_mail oe_mail_thread_msg">
<div t-attf-class="oe_mail_msg_#{record.type}">
- <img class="oe_mail_msg_image oe_left" t-att-src="record.mini_url"/>
+ <img t-if="record.type == 'email'" class="oe_email_icon oe_left" src="/mail/static/src/img/email_icon.png"/>
+ <img t-if="record.type == 'notification' || record.type == 'comment'" class="oe_mail_msg_image oe_left" t-att-src="record.mini_url"/>
<div class="oe_mail_msg_content">
<t t-if="record.type == 'email'"><t t-call="EmailDisplay" /></t>
<t t-if="record.type == 'notification' || record.type == 'comment'"><t t-call="NoteDisplay" /></t>
@@ -74,19 +75,27 @@
<a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a>
</t>
<span class="oe_mail_msg_body"><t t-raw="record.body"/></span>
- <t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t>
- <br />
- <span class="oe_mail_oe_fade">
- <a href="#" class="intlink oe_mail_oe_intlink" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}'><t t-raw="record.user_id[1]"/></a>
- on <t t-raw="record.date"/>
- </span>
- <t t-if="display['show_reply']"><a href="#" class="oe_mail_oe_space oe_mail_msg_reply oe_mail_oe_intlink"> Reply</a> </t>
- <t t-if="display['show_delete']">
- <t t-if="thread._is_author(record.user_id[0])"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_oe_space oe_mail_msg_delete oe_mail_oe_intlink"> Delete </a></t>
- </t>
- <t t-if="display['show_hide']">
- <t t-if="!(thread._is_author(record.user_id[0]))"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_oe_space oe_mail_msg_hide oe_mail_oe_intlink">Hide</a></t>
- </t>
+ <t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t><br/>
+ <ul>
+ <t t-if="display['show_reply']">
+ <li><a href="#" class="oe_mail_msg_reply oe_mail_oe_intlink">Reply</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
+ </t>
+ <t t-if="display['show_delete']">
+ <t t-if="thread._is_author(record.user_id[0])">
+ <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
+ </t>
+ </t>
+ <t t-if="display['show_hide']">
+ <t t-if="!(thread._is_author(record.user_id[0]))">
+ <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
+ </t>
+ </t>
+ <li>
+ <span class="oe_fade"><t t-raw="record.date"/>
+ by <a href="#" class="intlink oe_mail_oe_intlink" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}'><t t-raw="record.user_id[1]"/></a>
+ </span>
+ </li>
+ </ul>
</p>
</t>
@@ -95,22 +104,29 @@
<t t-if="params.thread_level > 0">
<a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a>
</t>
- <br />
- <span class="oe_mail_oe_bold">From:</span> <t t-esc="record.email_from"/> on <span class="oe_mail_oe_fade"><t t-raw="record.date"/></span><br />
- <span class="oe_mail_oe_bold">To:</span> <t t-esc="record.email_to"/><br />
- <span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/><br />
</p>
+ <p><span class="oe_mail_oe_bold">From:</span> <t t-esc="record.email_from"/></p>
+ <p><span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/></p>
<p class="oe_mail_msg">
<span class="oe_mail_msg_body"><t t-raw="record.body"/></span>
<t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t>
- <br />
- <t t-if="display['show_delete']">
- <t t-if="thread._is_author(record.user_id[0])"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink"> Delete </a></t>
+ </p>
+
+ <ul>
+ <t t-if="display['show_delete']">
+ <t t-if="thread._is_author(record.user_id[0])">
+ <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
</t>
- <t t-if="display['show_hide']">
- <t t-if="!(thread._is_author(record.user_id[0]))"><span class="oe_mail_oe_space"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a></span></t>
+ </t>
+ <t t-if="display['show_hide']">
+ <t t-if="!(thread._is_author(record.user_id[0]))">
+ <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
</t>
- </p>
+ </t>
+ <li>
+ <span class="oe_fade"><t t-raw="record.date"/></span>
+ </li>
+ </ul>
</t>
</template>