浏览代码

removed next_contact in quotation, fixed regex to convert relative links to absolute

version-14
Rushabh Mehta 12 年前
父节点
当前提交
c9746cd0d9
共有 3 个文件被更改,包括 7 次插入5 次删除
  1. +1
    -1
      core/doctype/communication/communication.py
  2. +4
    -2
      public/js/legacy/widgets/form/print_format.js
  3. +2
    -2
      public/js/wn/views/communication.js

+ 1
- 1
core/doctype/communication/communication.py 查看文件

@@ -106,7 +106,7 @@ def set_lead_and_contact(d):
if not d.lead:
d.lead = webnotes.conn.get_value("Lead", {"email_id": email_addr[1]}, "name") or None

if not d.lead and not d.contact:
if not (d.lead or d.contact):
d.lead = make_lead(d, email_addr[0], email_addr[1])

def make_lead(d, real_name, email_id):


+ 4
- 2
public/js/legacy/widgets/form/print_format.js 查看文件

@@ -373,8 +373,10 @@ $.extend(_p, {
// replace relative links by absolute links
var prefix = window.location.href.split("app.html")[0]
$.each(finished.match(/src=['"]([^'"]*)['"]/) || [], function(i, v) {
if(v.substr(0,4)!="src=") {
$.each(finished.match(/src=['"]([^'"]*)['"]/g) || [], function(i, v) {
if(v.substr(0,4)=="src=") {
var v = v.substr(5, v.length-6);
console.log(v);
if(v.substr(0,4)!="http")
finished = finished.replace(v, prefix + v);
}


+ 2
- 2
public/js/wn/views/communication.js 查看文件

@@ -108,7 +108,7 @@ wn.views.CommunicationComposer = Class.extend({
{label:"To", fieldtype:"Data", reqd: 1, fieldname:"recipients",
description:"Email addresses, separted by commas"},
{label:"Subject", fieldtype:"Data", reqd: 1},
{label:"Add Reply", fieldtype:"Button"},
{label:"Send", fieldtype:"Button"},
{label:"Message", fieldtype:"Text Editor", reqd: 1, fieldname:"content"},
{label:"Send Email", fieldtype:"Check"},
{label:"Send Me A Copy", fieldtype:"Check"},
@@ -170,7 +170,7 @@ wn.views.CommunicationComposer = Class.extend({
}
$(fields.send_email.input).attr("checked", "checked")
$(fields.add_reply.input).click(function() {
$(fields.send.input).click(function() {
var form_values = me.dialog.get_values();
if(!form_values) return;


正在加载...
取消
保存