diff options
| author | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-04-24 14:59:25 +0530 |
|---|---|---|
| committer | Amit Patel (OpenERP) <apa@tinyerp.com> | 2012-04-24 14:59:25 +0530 |
| commit | dfc4e3fb0979d76e47376680fbefc2a33e38bcd3 (patch) | |
| tree | 148f0e02cda3f890f40f0003d92334a44752e867 /addons/mail/static/src | |
| parent | c6bcc6d69fd7a1f8de0ad93baa642d5801b96a32 (diff) | |
| parent | e9f015e217f1ff48d95e9b55a9515b7276240c48 (diff) | |
[MERGE]
bzr revid: apa@tinyerp.com-20120417112722-7rz5vvcg6eo0jf3e
bzr revid: apa@tinyerp.com-20120419051214-j4wvjp9kz1w0zqs7
bzr revid: apa@tinyerp.com-20120423053400-unc6y6lonksopys3
bzr revid: apa@tinyerp.com-20120424092925-ezqfnppvfgocj94t
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/css/mail.css | 189 | ||||
| -rw-r--r-- | addons/mail/static/src/img/feeds-hover.png | bin | 41761 -> 15696 bytes | |||
| -rw-r--r-- | addons/mail/static/src/img/feeds.png | bin | 13316 -> 5647 bytes | |||
| -rw-r--r-- | addons/mail/static/src/img/groupdefault.png | bin | 19910 -> 3092 bytes | |||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 16 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 43 |
6 files changed, 155 insertions, 93 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index d920455537f..7f0cc6f222c 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -2,122 +2,171 @@ /* Wall */ /* ------------------------------ */ -div.oe_mail_wall { +.openerp div.oe_mail_wall { overflow: auto; - padding: 5px; + padding: 0; + background: white; } -div.oe_mail_wall_search { - width: 55%; +.openerp div.oe_mail_wall_act:after { + content: ""; + display: block; + clear: both; } /* 2 columns view */ -div.oe_mail_wall_left { +.openerp div.oe_mail_wall_left { float: left; - width: 65%; + width: 560px; + margin: 8px; } -div.oe_mail_wall_right { - float: right; - width: 34%; +.openerp div.oe_mail_wall_right { + margin-left: 565px; + margin: 8px; } -.oe_mail_wall_thread div.oe_mail_thread_act .oe_mail_action_textarea, div.oe_mail_thread_subthread .oe_mail_action_textarea { +.openerp div.oe_mail_wall_threads { + margin-top: 8px; +} + +.openerp textarea.oe_mail_wall_action_textarea { + width: 550px; + height: 60px; + padding: 5px; +} + +.openerp div.oe_mail_wall_threads textarea { height: 20px; padding: 2px; } -.oe_mail_thread_subthread div.oe_mail_thread_act .oe_mail_msg_image, .oe_mail_thread_subthread div.oe_mail_thread_display .oe_mail_msg_image { +.openerp div.oe_mail_thread_subthread img { width: 30px; height: 30px; } -.oe_mail_thread_subthread .oe_mail_msg_content, .oe_mail_thread_subthread .oe_mail_msg_content { +.openerp div.oe_mail_thread_subthread div.oe_mail_msg_content { margin-left: 40px; } -div.oe_mail_wall_more { +.openerp div.oe_mail_wall_more { text-align: center; display: none; } + /* ------------------------------ */ /* RecordThread */ /* ------------------------------ */ -.oe_mail_recthread { +.openerp div.oe_mail_recthread { overflow: auto; - padding: 5px 5px 5px 5px; } /* Left-side CSS */ -.oe_mail_recthread_actions { - margin-bottom: 10px; +.openerp div.oe_mail_recthread_actions { + margin-bottom: 8px; } -.oe_mail_recthread_followers { - margin-bottom: 10px; -} - -.oe_mail_followers_action, .oe_mail_followers_display { +.openerp div.oe_mail_recthread_followers { + margin-bottom: 8px; } /* RecordThread: 2 columns view */ -.oe_mail_recthread_left { +.openerp div.oe_mail_recthread_left { float: left; width: 55%; } -.oe_mail_recthread_right { +.openerp div.oe_mail_recthread_right { float: right; - width: 25%; - margin-right: 5%; + width: 250px; } -.oe_mail_button_follow, .oe_mail_button_unfollow { +.openerp div.oe_mail_recthread_actions button { width: 120px; } -.oe_mail_button_followers { +.openerp button.oe_mail_button_followers { display: inline; - width: 120px; } -.oe_mail_followers h4 { - margin: 0 0 8px; +.openerp button.oe_mail_button_mouseout { + color: white; + background-color: #8a89ba; + background-image: -webkit-gradient(linear, left top, left bottom, from(#8a89ba), to(#807fb4)); + background-image: -webkit-linear-gradient(top, #8a89ba, #807fb4); + background-image: -moz-linear-gradient(top, #8a89ba, #807fb4); + background-image: -ms-linear-gradient(top, #8a89ba, #807fb4); + background-image: -o-linear-gradient(top, #8a89ba, #807fb4); + background-image: linear-gradient(to bottom, #8a89ba, #807fb4); +} + +.openerp button.oe_mail_button_mouseover { + display: none; + color: white; + background-color: #dc5f59; + background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630)); + background-image: -webkit-linear-gradient(top, #dc5f59, #b33630); + background-image: -moz-linear-gradient(top, #dc5f59, #b33630); + background-image: -ms-linear-gradient(top, #dc5f59, #b33630); + background-image: -o-linear-gradient(top, #dc5f59, #b33630); + background-image: linear-gradient(to bottom, #dc5f59, #b33630); +} + +.openerp textarea.oe_mail_action_textarea { + height: 60px; + padding: 5px; } /* ------------------------------ */ /* ThreadDisplay */ /* ------------------------------ */ -div.oe_mail_thread_act { +.openerp div.oe_mail_thread_act { white-space: normal; margin-bottom: 5px; padding: 4px; } -div.oe_mail_thread_display { +.openerp div.oe_mail_thread_act:after { + content: ""; + display: block; + clear: both; +} + +.openerp div.oe_mail_thread_display { white-space: normal; - margin-bottom: 5px; } -div.oe_mail_thread_subthread { +.openerp div.oe_mail_thread_subthread { margin-top: 8px; padding-left: 5%; } -div.oe_mail_thread_more { +.openerp div.oe_mail_thread_more { display: none; border-bottom: 1px solid #D2D9E7; } -li.oe_mail_thread_msg { +.openerp li.oe_mail_thread_msg { padding: 1px; } -.notification, .email { - background: #E0E0E0; +.openerp li.oe_mail_thread_msg:after { + content: ""; + display: block; + clear: both; +} + +.openerp li.oe_mail_thread_msg > div:after { + content: ""; + display: block; + clear: both; +} + +.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; @@ -126,38 +175,35 @@ li.oe_mail_thread_msg { border-radius: 4px; } -.comment { - padding: 4px; +.openerp li.oe_mail_thread_msg > .oe_mail_msg_comment { + background: #eee; } -.notification:after, .email:after, .comment:after { - content: ""; - display: block; - clear: both; +.openerp div.oe_mail_thread_subthread .oe_mail_msg_comment { + background: white; +} + +.openerp .oe_mail_msg_notification { + background: #eee; } -li.oe_mail_thread_msg:after, div.oe_mail_thread_act:after { +.openerp .oe_mail_msg_notification:after, .openerp .oe_mail_msg_comment:after, .openerp .oe_mail_msg_email:after { content: ""; display: block; clear: both; } -.oe_mail_msg_content { +.openerp .oe_mail_msg_content { margin-left: 60px; } -.oe_mail_msg_content:after { +.openerp .oe_mail_msg_content:after { content: ""; display: block; clear: both; } -.oe_mail_action_textarea { - height: 50px; - padding: 5px; -} - -.oe_mail_msg_image { +.openerp img.oe_mail_msg_image { margin-right: 8px; width: 45px; height: 45px; @@ -175,11 +221,11 @@ li.oe_mail_thread_msg:after, div.oe_mail_thread_act:after { clip: rect(5px, 40px, 45px, 0px); } -p.oe_mail_msg_p_email_header { +.openerp p.oe_mail_msg_p_email_header { border-bottom: 1px solid #D2D9E7; } -.oe_mail_msg_body a.reduce, .oe_mail_msg_body_short a.expand { +.openerp span.oe_mail_msg_body a.reduce, .openerp span.oe_mail_msg_body_short a.expand { color: #4E43E7; } @@ -187,17 +233,17 @@ p.oe_mail_msg_p_email_header { /* Styling (should be openerp) */ /* ------------------------------ */ -ul.oe_mail { +.openerp ul.oe_mail { padding: 0; margin: 0; } -li.oe_mail { +.openerp li.oe_mail { list-style-type: none; margin-bottom: 2px; } -input.oe_mail, textarea.oe_mail { +.openerp input.oe_mail, textarea.oe_mail { width: 100%; padding: 4px; font-size: 12px; @@ -215,7 +261,7 @@ input.oe_mail, textarea.oe_mail { border-radius: 3px; } -input.oe_mail:focus, textarea.oe_mail:focus { +.openerp input.oe_mail:focus, textarea.oe_mail:focus { outline: 0; border-color: rgba(82, 168, 236, 0.8); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); @@ -223,37 +269,30 @@ input.oe_mail:focus, textarea.oe_mail:focus { -box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); } -p.oe_mail_msg { +.openerp p.oe_mail_msg { padding: 0; margin: 0; } -.oe_mail_oe_right { +.openerp .oe_mail_oe_right { float: right; margin-right: 8px; } -.oe_mail_oe_left { +.openerp .oe_mail_oe_left { float: left; margin-right: 8px; } -.oe_mail_oe_fade { - color: #888888; -} - -.oe_mail_oe_bold { - font-weight: bold; -} - -a.oe_mail_oe_intlink { +.openerp a.oe_mail_oe_intlink { color: #8786b7; } -.oe_mail_oe_warning, .oe_mail_oe_warning a { - color: #C03000; +.openerp .oe_mail_oe_bold { + font-weight: bold; } -.oe_mail_oe_space { +.openerp .oe_mail_oe_space { margin-left: 15px; + margin-right: 4px; } diff --git a/addons/mail/static/src/img/feeds-hover.png b/addons/mail/static/src/img/feeds-hover.png Binary files differindex 81f098d35c2..67070d3e7df 100644 --- a/addons/mail/static/src/img/feeds-hover.png +++ b/addons/mail/static/src/img/feeds-hover.png diff --git a/addons/mail/static/src/img/feeds.png b/addons/mail/static/src/img/feeds.png Binary files differindex 5ca849e168c..ac2293c0bf5 100644 --- a/addons/mail/static/src/img/feeds.png +++ b/addons/mail/static/src/img/feeds.png diff --git a/addons/mail/static/src/img/groupdefault.png b/addons/mail/static/src/img/groupdefault.png Binary files differindex fd826837266..cf160022470 100644 --- a/addons/mail/static/src/img/groupdefault.png +++ b/addons/mail/static/src/img/groupdefault.png diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 20ff72645a2..d99674f98a7 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -275,6 +275,8 @@ openerp.mail = function(session) { record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit); record.body = this.do_replace_internal_links(record.body); if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body); + // format date according to the user timezone + record.date = session.web.format_value(record.date, {type:"datetime"}); // render $(session.web.qweb.render('ThreadMsg', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}) ).appendTo(this.$element.children('div.oe_mail_thread_display:first')); @@ -388,6 +390,11 @@ openerp.mail = function(session) { return this.fetch_comments(this.params.limit, this.params.offset, domain); }, + /** + * + * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g); + * var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g); + */ do_replace_internal_links: function (string) { var self = this; var icon_list = ['al', 'pinky'] @@ -427,7 +434,6 @@ openerp.mail = function(session) { /** * - * var regex_login = new RegExp(/(^|\s)@(\w*[a-zA-Z_.]+\w*\s)/g); * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g); * var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g); */ @@ -485,11 +491,11 @@ openerp.mail = function(session) { // bind buttons this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }).hide(); this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); }) - .mouseover(function () { $(this).html('Follow').addClass('following'); }) - .mouseleave(function () { $(this).html('Not following').removeClass('following'); }); + .mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) + .mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); }) - .mouseover(function () { $(this).html('Unfollow').removeClass('following').addClass('unfollow'); }) - .mouseleave(function () { $(this).html('Following').removeClass('unfollow').addClass('following'); }); + .mouseover(function () { $(this).html('Unfollow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) + .mouseleave(function () { $(this).html('Following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); this.reinit(); }, diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 0f49902b6b3..f034b04311d 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -2,13 +2,17 @@ <template> <div t-name="Wall" class="oe_mail_wall"> - <div class="oe_mail_wall_search"> + <div class="oe_view_manager_header"> + <div class="oe_view_manager_row"> + <h2 class="oe_view_title">All Feeds</h2> + </div> </div> <div class="oe_mail_wall_left"> <div class="oe_mail_wall_act"> - <textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="Add a personnal message here..."/><br /> - <button class="oe_mail_wall_button_comment" type="button">Post comment</button> + <textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="Add a personnal message here..."/> + <button class="oe_mail_oe_right oe_mail_wall_button_comment" type="button">Post comment</button> </div> + <div class="oe_clear"></div> <div class="oe_mail_wall_threads"> </div> <div class="oe_mail_wall_more"> @@ -27,8 +31,8 @@ </div> <div class="oe_mail_recthread_right"> <div class="oe_mail_recthread_actions"> - <button type="button" class="oe_mail_button_follow">Not following</button> - <button type="button" class="oe_mail_button_unfollow">Following</button> + <button type="button" class="oe_mail_button_follow oe_mail_button_mouseout">Not following</button> + <button type="button" class="oe_mail_button_unfollow oe_mail_button_mouseout">Following</button> <button type="button" class="oe_mail_button_followers">Display followers</button> </div> <div class="oe_mail_recthread_followers"> @@ -39,11 +43,11 @@ </div> </div> - <ul t-name="Thread" class="oe_mail_thread oe_mail"> + <ul t-name="Thread" class="oe_mail oe_mail_thread"> <div class="oe_mail_thread_act"> <img class="oe_mail_msg_image oe_mail_oe_left" alt="User img"/> <div class="oe_mail_msg_content"> - <textarea class="oe_mail_action_textarea oe_mail" 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 = '';"/><br /> </div> </div> <div class="oe_mail_thread_display"></div> @@ -52,8 +56,8 @@ </div> </ul> - <li t-name="ThreadMsg" t-attf-class="oe_mail_thread_msg oe_mail"> - <div t-attf-class="{record.type}"> + <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_mail_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> @@ -65,7 +69,9 @@ <t t-name="NoteDisplay"> <p class="oe_mail_msg"> - <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 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> <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 /> @@ -73,18 +79,22 @@ <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']"><span class="oe_mail_oe_space"><a href="#" class="oe_mail_msg_reply oe_mail_oe_intlink">Reply</a></span></t> + <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])"><span class="oe_mail_oe_space"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a></span></t> + <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]))"><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-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> </p> </t> <t t-name="EmailDisplay"> <p class="oe_mail_msg oe_mail_msg_p_email_header"> + <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 /> @@ -92,6 +102,13 @@ <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> + </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> </p> </t> |
