mirror of
https://github.com/itsdave-de/fusionpbx_connect.git
synced 2025-05-07 08:05:30 +02:00
set modal and maps right
This commit is contained in:
parent
7545c0e25d
commit
ac6b9038e9
@ -8,7 +8,7 @@ function loadLeafletAndInitMap(frm, callback) {
|
|||||||
function create_dialog_and_init_map(frm) {
|
function create_dialog_and_init_map(frm) {
|
||||||
const dialog = new frappe.ui.Dialog({
|
const dialog = new frappe.ui.Dialog({
|
||||||
title: 'Show Route',
|
title: 'Show Route',
|
||||||
fields: [{ fieldtype: 'HTML', fieldname: 'map_html', label: 'Map', options: '<div id="map" style="height:500px;"></div>' }],
|
fields: [{ fieldtype: 'HTML', fieldname: 'map_html', label: 'Map', options: '<div id="map" style="height:calc(80vh - 20px);"></div>' }],
|
||||||
primary_action_label: 'Close',
|
primary_action_label: 'Close',
|
||||||
primary_action() {
|
primary_action() {
|
||||||
if (currentMap) {
|
if (currentMap) {
|
||||||
@ -20,6 +20,14 @@ function create_dialog_and_init_map(frm) {
|
|||||||
size: 'extra-large'
|
size: 'extra-large'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Adjust the size of the dialog dynamically to 80% of the browser window
|
||||||
|
const modalDialog = dialog.$wrapper.find('.modal-content');
|
||||||
|
modalDialog.css({
|
||||||
|
"width": "85vw",
|
||||||
|
"max-width": "85vw",
|
||||||
|
"margin-left": "-25vh"
|
||||||
|
});
|
||||||
|
|
||||||
// Add hide event to reload the page when the dialog is closed
|
// Add hide event to reload the page when the dialog is closed
|
||||||
dialog.onhide = function () {
|
dialog.onhide = function () {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user