Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/public/js/communication.js b/public/js/communication.js
index ca316cf..70a08af 100644
--- a/public/js/communication.js
+++ b/public/js/communication.js
@@ -20,6 +20,10 @@
this.comm_list = [];
$.extend(this, opts);
+ if(this.doc.__islocal) {
+ return;
+ }
+
this.list.sort(function(a, b) { return
(new Date(a.modified) > new Date(b.modified))
? -1 : 1; })
@@ -69,14 +73,15 @@
{label:"Subject", fieldtype:"Data", reqd: 1},
{label:"Message", fieldtype:"Text Editor", reqd: 1, fieldname:"content"},
{label:"Send Email", fieldtype:"Check"},
- {label:"Send", fieldtype:"Button"},
+ {label:"Add Reply", fieldtype:"Button"},
]
});
$(d.fields_dict.send_email.input).attr("checked", "checked")
- $(d.fields_dict.send.input).click(function() {
+ $(d.fields_dict.add_reply.input).click(function() {
var args = d.get_values();
if(!args) return;
+ $(this).set_working();
wn.call({
method:"support.doctype.communication.communication.make",
args: $.extend(args, {
@@ -93,8 +98,15 @@
});
});
- d.fields_dict.content.input.set_input("<p></p><p></p>=== In response to ===<p></p>"
- + me.list[0].content)
+ if(me.list.length > 0) {
+ d.fields_dict.content.input.set_input("<p></p>"
+ + (wn.boot.profile.email_signature || "")
+ +"<p></p>"
+ +"-----In response to-----<p></p>"
+ + me.list[0].content)
+ } else {
+
+ }
$(d.fields_dict.subject.input).val(this.doc.subject || "").change();
d.show();
@@ -108,7 +120,7 @@
}
if(!doc.sender) doc.sender = "[unknown sender]";
doc.sender = doc.sender.replace(/</, "<").replace(/>/, ">");
- doc.content = doc.content.split("=== In response to ===")[0];
+ doc.content = doc.content.split("-----In response to-----")[0];
doc.content = doc.content.split("-----Original Message-----")[0];
},
make_line: function(doc) {
@@ -117,8 +129,8 @@
<p><b>%(sender)s on %(when)s</b> \
<a href="#Form/Communication/%(name)s" style="font-size: 90%">\
Show Details</a></p>\
- <div class="comm-content" style="border-top: 1px solid #ddd; padding: 10px; \
- display: none;"></div>\
+ <div class="comm-content" style="border-top: 1px solid #ddd; \
+ padding: 10px; overflow-x: auto; display: none;"></div>\
</td></tr>', doc))
.appendTo(this.body)
.css({"cursor":"pointer"})
diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt
index 3878d27..fc0c575 100644
--- a/support/doctype/support_ticket/support_ticket.txt
+++ b/support/doctype/support_ticket/support_ticket.txt
@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-11-02 17:17:05",
"modified_by": "Administrator",
- "modified": "2012-11-27 18:21:06"
+ "modified": "2012-11-28 10:45:19"
},
{
"autoname": "naming_series:",
@@ -69,12 +69,18 @@
"doctype": "DocField",
"label": "Subject",
"fieldname": "subject",
- "fieldtype": "Text",
+ "fieldtype": "Data",
"reqd": 1,
"permlevel": 0,
"in_filter": 1
},
{
+ "doctype": "DocField",
+ "fieldname": "cb00",
+ "fieldtype": "Column Break",
+ "permlevel": 0
+ },
+ {
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Raised By (Email)",
@@ -87,6 +93,12 @@
"in_filter": 1
},
{
+ "doctype": "DocField",
+ "fieldname": "sb00",
+ "fieldtype": "Section Break",
+ "permlevel": 0
+ },
+ {
"oldfieldtype": "Text",
"doctype": "DocField",
"label": "Description",