Fixed add width property setter

This commit is contained in:
Anand Doshi 2014-06-16 16:06:22 +05:30
parent 65e177f98d
commit 1fb25aa093
2 changed files with 5 additions and 4 deletions

View file

@ -108,8 +108,9 @@ def set_default(key, value, parent=None):
frappe.clear_cache(user=frappe.session.user)
@frappe.whitelist()
def make_width_property_setter():
doc = json.loads(frappe.form_dict)
def make_width_property_setter(doc):
if isinstance(doc, basestring):
doc = json.loads(doc)
if doc["doctype"]=="Property Setter" and doc["property"]=="width":
frappe.get_doc(doc).insert(ignore_permissions = True)

View file

@ -124,7 +124,7 @@ frappe.slickgrid_tools = {
frappe.call({
method:"frappe.client.make_width_property_setter",
args: {
doclist: [{
doc: {
doctype:'Property Setter',
doctype_or_field: 'DocField',
doc_type: col.docfield.parent,
@ -132,7 +132,7 @@ frappe.slickgrid_tools = {
property: 'width',
value: col.width,
"__islocal": 1
}]
}
}
});
col.previousWidth = col.width;