mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
support_ticket: load communication onload
This commit is contained in:
@@ -149,13 +149,15 @@ erpnext.CommunicationView = Class.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
this.body = $(repl('<div class="communication" title="Click to Expand / Collapse">\
|
this.body = $(repl('<div class="communication" title="Click to Expand / Collapse">\
|
||||||
<p><b>%(email_address)s on %(when)s</b></p>\
|
<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))
|
</div>', this.doc))
|
||||||
.appendTo(this.parent)
|
.appendTo(this.parent)
|
||||||
.css({"cursor":"pointer"})
|
.css({"cursor":"pointer"})
|
||||||
.click(function() {
|
.click(function() {
|
||||||
$(this).find(".comm-content").toggle();
|
$(this).find(".comm-content").toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.body.find(".comm-content").html(this.doc.content);
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
this.body.find(".comm-content").toggle();
|
this.body.find(".comm-content").toggle();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class DocType(TransactionBase):
|
|||||||
|
|
||||||
def add_communication_list(self):
|
def add_communication_list(self):
|
||||||
# remove communications if present
|
# 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
|
comm_list = webnotes.conn.sql("""select * from tabCommunication
|
||||||
where support_ticket=%s order by modified desc limit 20""", self.doc.name, as_dict=1)
|
where support_ticket=%s order by modified desc limit 20""", self.doc.name, as_dict=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user