feat: custom position for popovers
(cherry picked from commit 227019e1c63e61264c51f5841cfae476610628bf)
This commit is contained in:
parent
6d5c0a523b
commit
321002fe80
3 changed files with 12 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ def get_form_tour_steps(tour_name):
|
|||
title=step_doc.title,
|
||||
fieldname=step_doc.fieldname,
|
||||
description=step_doc.description,
|
||||
position=slug(step_doc.position),
|
||||
)
|
||||
|
||||
tour = frappe.get_doc('Form Tour', tour_name)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"title",
|
||||
"position",
|
||||
"description",
|
||||
"column_break_2",
|
||||
"field",
|
||||
|
|
@ -53,12 +54,19 @@
|
|||
{
|
||||
"fieldname": "column_break_2",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"default": "Bottom",
|
||||
"fieldname": "position",
|
||||
"fieldtype": "Select",
|
||||
"label": "Position",
|
||||
"options": "Left\nLeft Center\nLeft Bottom\nTop\nTop Center\nTop Right\nRight\nRight Center\nRight Bottom\nBottom\nBottom Center\nBottom Right\nMid Center"
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-05-22 20:49:58.961230",
|
||||
"modified": "2021-05-22 20:59:58.961230",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Form Tour Step",
|
||||
|
|
|
|||
|
|
@ -1637,7 +1637,8 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
element: `.frappe-control[data-fieldname='${step.fieldname}']`,
|
||||
popover: {
|
||||
title: step.title || field.label,
|
||||
description: step.description
|
||||
description: step.description,
|
||||
position: step.position || 'bottom'
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue