mirror of
https://github.com/itsdave-de/fusionpbx_connect.git
synced 2025-05-06 15:45:15 +02:00
set right modal size
This commit is contained in:
parent
b6dfc2fa25
commit
8705b6c65e
@ -8,7 +8,7 @@ function loadLeafletAndInitMap(frm, callback) {
|
||||
function create_dialog_and_init_map(frm) {
|
||||
const dialog = new frappe.ui.Dialog({
|
||||
title: 'Show Route',
|
||||
fields: [{ fieldtype: 'HTML', fieldname: 'map_html', label: 'Map', options: '<div id="map" style="height:calc(80vh - 20px);"></div>' }],
|
||||
fields: [{ fieldtype: 'HTML', fieldname: 'map_html', label: 'Map', options: '<div id="map" style="height:calc(80vh - 50px);"></div>' }],
|
||||
primary_action_label: 'Close',
|
||||
primary_action() {
|
||||
if (currentMap) {
|
||||
@ -20,15 +20,9 @@ function create_dialog_and_init_map(frm) {
|
||||
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"
|
||||
});
|
||||
*/
|
||||
dialog.$wrapper.find('.modal-dialog').css("max-width", "90%");
|
||||
dialog.$wrapper.find('.modal-dialog').css("width", "90%");
|
||||
|
||||
// Add hide event to reload the page when the dialog is closed
|
||||
dialog.onhide = function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user