Browse Source

communication: check send with attach if from sidebar

version-14
Rushabh Mehta 12 years ago
parent
commit
46fd5c121e
3 changed files with 5 additions and 2 deletions
  1. +0
    -1
      public/build.json
  2. +2
    -1
      public/js/legacy/widgets/form/form.js
  3. +3
    -0
      public/js/wn/views/communication.js

+ 0
- 1
public/build.json View File

@@ -137,7 +137,6 @@
"lib/public/js/legacy/widgets/form/grid.js", "lib/public/js/legacy/widgets/form/grid.js",
"lib/public/js/legacy/widgets/form/form_grid.js", "lib/public/js/legacy/widgets/form/form_grid.js",
"lib/public/js/legacy/widgets/form/print_format.js", "lib/public/js/legacy/widgets/form/print_format.js",
"lib/public/js/legacy/widgets/form/email.js",
"lib/public/js/legacy/widgets/form/clientscriptAPI.js", "lib/public/js/legacy/widgets/form/clientscriptAPI.js",
"lib/public/js/legacy/widgets/form/form_comments.js", "lib/public/js/legacy/widgets/form/form_comments.js",
"lib/public/js/legacy/wn/widgets/form/sidebar.js", "lib/public/js/legacy/wn/widgets/form/sidebar.js",


+ 2
- 1
public/js/legacy/widgets/form/form.js View File

@@ -203,7 +203,8 @@ _f.Frm.prototype.email_doc = function() {
new wn.views.CommunicationComposer({ new wn.views.CommunicationComposer({
doc: this.doc, doc: this.doc,
subject: get_doctype_label(this.meta.name) + ': ' + this.docname, subject: get_doctype_label(this.meta.name) + ': ' + this.docname,
recipients: this.doc.email || this.doc.email_id || this.doc.contact_email
recipients: this.doc.email || this.doc.email_id || this.doc.contact_email,
attach_document_print: true
}); });
} }




+ 3
- 0
public/js/wn/views/communication.js View File

@@ -160,6 +160,9 @@ wn.views.CommunicationComposer = Class.extend({
var me = this; var me = this;
var fields = this.dialog.fields_dict; var fields = this.dialog.fields_dict;
if(this.attach_document_print)
$(fields.attach_document_print.input).attr("checked", "checked")

$(fields.send_email.input).attr("checked", "checked") $(fields.send_email.input).attr("checked", "checked")
$(fields.add_reply.input).click(function() { $(fields.add_reply.input).click(function() {
var form_values = me.dialog.get_values(); var form_values = me.dialog.get_values();


Loading…
Cancel
Save