@@ -108,8 +108,9 @@ def set_default(key, value, parent=None): | |||||
frappe.clear_cache(user=frappe.session.user) | frappe.clear_cache(user=frappe.session.user) | ||||
@frappe.whitelist() | @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": | if doc["doctype"]=="Property Setter" and doc["property"]=="width": | ||||
frappe.get_doc(doc).insert(ignore_permissions = True) | frappe.get_doc(doc).insert(ignore_permissions = True) | ||||
@@ -124,7 +124,7 @@ frappe.slickgrid_tools = { | |||||
frappe.call({ | frappe.call({ | ||||
method:"frappe.client.make_width_property_setter", | method:"frappe.client.make_width_property_setter", | ||||
args: { | args: { | ||||
doclist: [{ | |||||
doc: { | |||||
doctype:'Property Setter', | doctype:'Property Setter', | ||||
doctype_or_field: 'DocField', | doctype_or_field: 'DocField', | ||||
doc_type: col.docfield.parent, | doc_type: col.docfield.parent, | ||||
@@ -132,7 +132,7 @@ frappe.slickgrid_tools = { | |||||
property: 'width', | property: 'width', | ||||
value: col.width, | value: col.width, | ||||
"__islocal": 1 | "__islocal": 1 | ||||
}] | |||||
} | |||||
} | } | ||||
}); | }); | ||||
col.previousWidth = col.width; | col.previousWidth = col.width; | ||||