From 1a5c9c59260f27b29b3d7e28be2e899846b39aee Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 27 Feb 2012 18:56:31 +0530 Subject: [PATCH] message reply --- erpnext/utilities/page/messages/messages.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/utilities/page/messages/messages.js b/erpnext/utilities/page/messages/messages.js index 22be895825b..39f79748700 100644 --- a/erpnext/utilities/page/messages/messages.js +++ b/erpnext/utilities/page/messages/messages.js @@ -38,6 +38,7 @@ wn.pages.messages.onload = function(wrapper) { wn.pages.messages.onshow = function(wrapper) { erpnext.messages.show(); setTimeout(erpnext.messages.refresh, 5000); + $('#message-post-text').focus(); } erpnext.messages = { @@ -83,19 +84,26 @@ erpnext.messages = { data.creation = dateutil.comment_when(data.creation); data.comment_by_fullname = wn.boot.user_fullnames[data.owner]; + data.reply_html = ''; if(data.owner==user) { data.cls = 'message-self'; data.comment_by_fullname = 'You'; - data.delete_html = repl('×', data); } else { data.cls = 'message-other'; data.delete_html = ''; + if(erpnext.messages.contact==user) { + data.reply_html = repl('\ + Reply', data) + } } wrapper.innerHTML = repl('
%(delete_html)s\ %(comment)s\ -
by %(comment_by_fullname)s, %(creation)s
\ +
by %(comment_by_fullname)s, %(creation)s
\ + %(reply_html)s\
', data); } });