support_ticket: load communication onload
This commit is contained in:
parent
a3207977d9
commit
87ce772749
@ -149,13 +149,15 @@ erpnext.CommunicationView = Class.extend({
|
||||
var me = this;
|
||||
this.body = $(repl('<div class="communication" title="Click to Expand / Collapse">\
|
||||
<p><b>%(email_address)s on %(when)s</b></p>\
|
||||
<p class="comm-content" style="border-top: 1px solid #ddd">%(content)s</p>\
|
||||
<div class="comm-content" style="border-top: 1px solid #ddd; padding: 10px"></div>\
|
||||
</div>', this.doc))
|
||||
.appendTo(this.parent)
|
||||
.css({"cursor":"pointer"})
|
||||
.click(function() {
|
||||
$(this).find(".comm-content").toggle();
|
||||
});
|
||||
|
||||
this.body.find(".comm-content").html(this.doc.content);
|
||||
},
|
||||
toggle: function() {
|
||||
this.body.find(".comm-content").toggle();
|
||||
|
@ -34,7 +34,7 @@ class DocType(TransactionBase):
|
||||
|
||||
def add_communication_list(self):
|
||||
# remove communications if present
|
||||
self.doclist = self.doclist.get({"doctype": ["!=", "Communcation"]})
|
||||
self.doclist = webnotes.doclist(self.doclist).get({"doctype": ["!=", "Communcation"]})
|
||||
|
||||
comm_list = webnotes.conn.sql("""select * from tabCommunication
|
||||
where support_ticket=%s order by modified desc limit 20""", self.doc.name, as_dict=1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user