浏览代码

refactored communication and added to Lead / Contact

version-14
Rushabh Mehta 12 年前
父节点
当前提交
056d871c6b
共有 6 个文件被更改,包括 19 次插入9 次删除
  1. +1
    -1
      public/css/legacy/body.css
  2. +0
    -1
      public/css/legacy/fields.css
  3. +4
    -1
      public/css/ui/views.css
  4. +1
    -1
      public/js/legacy/widgets/form/form_fields.js
  5. +4
    -0
      webnotes/__init__.py
  6. +9
    -5
      webnotes/handler.py

+ 1
- 1
public/css/legacy/body.css 查看文件

@@ -85,7 +85,7 @@ select, input, textarea {

textarea {
font-family: inherit;
height: 120px;
height: 160px;
width: 90%;
font-size: inherit;
white-space: normal;


+ 0
- 1
public/css/legacy/fields.css 查看文件

@@ -68,7 +68,6 @@

.input-mandatory {
font-size: 14px !important;
font-weight: bold;
}

.field-to-update {


+ 4
- 1
public/css/ui/views.css 查看文件

@@ -70,7 +70,10 @@ div.appframe-marker {
}

.appframe-title {
font-size: 160%;
font-size: 140%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: bold;
display: inline-block;
margin-top: 5px;


+ 1
- 1
public/js/legacy/widgets/form/form_fields.js 查看文件

@@ -350,7 +350,7 @@ _f.CodeField.prototype.make_input = function() {
me.run_trigger();
}
this.get_value = function() {
return me.editor.getContent(); // tinyMCE
return me.editor && me.editor.getContent(); // tinyMCE
}

} else {


+ 4
- 0
webnotes/__init__.py 查看文件

@@ -261,6 +261,10 @@ def generate_hash():
import hashlib, time
return hashlib.sha224(str(time.time())).hexdigest()

def get_obj(dt = None, dn = None, doc=None, doclist=[], with_children = 0):
from webnotes.model.code import get_obj
return get_obj(dt, dn, doc, doclist, with_children)

def doc(doctype=None, name=None, fielddata=None):
from webnotes.model.doc import Document
return Document(doctype, name, fielddata)


+ 9
- 5
webnotes/handler.py 查看文件

@@ -227,11 +227,7 @@ def execute_cmd(cmd):
if not webnotes.conn.in_transaction:
webnotes.conn.begin()

if 'arg' in webnotes.form_dict:
# direct method call
ret = method(webnotes.form_dict.get('arg'))
else:
ret = method()
ret = call(method, webnotes.form_dict)

# returns with a message
if ret:
@@ -243,6 +239,14 @@ def execute_cmd(cmd):
if webnotes.conn.in_transaction:
webnotes.conn.commit()

def call(fn, args):
import inspect
fnargs, varargs, varkw, defaults = inspect.getargspec(fn)
newargs = {}
for a in fnargs:
newargs[a] = args.get(a) or (defaults and defaults[fnargs.index(a)]) or None
return fn(**newargs)

def get_method(cmd):
"""get method object from cmd"""
if '.' in cmd:


正在加载...
取消
保存