ソースを参照

Fixed add width property setter

version-14
Anand Doshi 11年前
コミット
1fb25aa093
2個のファイルの変更5行の追加4行の削除
  1. +3
    -2
      frappe/client.py
  2. +2
    -2
      frappe/public/js/frappe/misc/tools.js

+ 3
- 2
frappe/client.py ファイルの表示

@@ -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)




+ 2
- 2
frappe/public/js/frappe/misc/tools.js ファイルの表示

@@ -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;


読み込み中…
キャンセル
保存