Merge branch 'ent-12143-arreglar-mejorar-visualizacion-de-calendarios-y-selectores-de-fecha' into 'develop'

Ent 12143 arreglar mejorar visualizacion de calendarios y selectores de fecha

See merge request artica/pandorafms!6765
This commit is contained in:
Rafael Ameijeiras 2024-01-18 11:27:20 +00:00
commit 8a41a04345
4 changed files with 36 additions and 5 deletions

View File

@ -8,7 +8,8 @@ function show_option_dialog(settings) {
modal: { modal: {
title: settings.title, title: settings.title,
cancel: settings.btn_cancel, cancel: settings.btn_cancel,
ok: settings.btn_text ok: settings.btn_text,
overlay: true
}, },
onshow: { onshow: {
page: settings.url, page: settings.url,
@ -22,6 +23,12 @@ function show_option_dialog(settings) {
method: "updateDashboard", method: "updateDashboard",
dataType: "json" dataType: "json"
}, },
oncancel: {
reload: true
},
onclose: {
reload: true
},
ajax_callback: update_dashboard ajax_callback: update_dashboard
}); });
} }
@ -458,6 +465,12 @@ function initialiceLayout(data) {
}*/ }*/
function configurationWidget(cellId, widgetId, size) { function configurationWidget(cellId, widgetId, size) {
var reload = 0;
var overlay = false;
if (widgetId == 46) {
reload = 1;
overlay = true;
}
title = $("#hidden-widget_name_" + cellId).val(); title = $("#hidden-widget_name_" + cellId).val();
load_modal({ load_modal({
target: $("#modal-config-widget"), target: $("#modal-config-widget"),
@ -466,7 +479,8 @@ function initialiceLayout(data) {
modal: { modal: {
title: "Configure widget " + title, title: "Configure widget " + title,
cancel: "Cancel", cancel: "Cancel",
ok: "Ok" ok: "Ok",
overlay: overlay
}, },
onshow: { onshow: {
page: data.page, page: data.page,
@ -484,8 +498,12 @@ function initialiceLayout(data) {
method: "saveWidgetIntoCell", method: "saveWidgetIntoCell",
dataType: "json" dataType: "json"
}, },
oncancel: {
reload: reload
},
ajax_callback: update_widget_to_cell, ajax_callback: update_widget_to_cell,
onsubmitClose: 1 onsubmitClose: 1,
onsubmitReload: reload
}); });
} }

View File

@ -174,6 +174,8 @@ function load_modal(settings) {
if (typeof settings.oncancel.confirm == "function") { if (typeof settings.oncancel.confirm == "function") {
//receive function //receive function
settings.oncancel.confirm(cancelModal); settings.oncancel.confirm(cancelModal);
} else if (settings.oncancel.reload == true) {
location.reload();
} else if (settings.oncancel != undefined) { } else if (settings.oncancel != undefined) {
cancelModal(); cancelModal();
} }
@ -353,6 +355,13 @@ function load_modal(settings) {
AJAX_RUNNING = 0; AJAX_RUNNING = 0;
} }
}); });
if (
settings.onsubmitReload != undefined &&
settings.onsubmitReload == true
) {
location.reload();
}
} else { } else {
AJAX_RUNNING = 0; AJAX_RUNNING = 0;
} }

View File

@ -274,9 +274,9 @@ class SecurityHardening extends Widget
'name' => 'range', 'name' => 'range',
'type' => 'date_range', 'type' => 'date_range',
'selected' => 'chose_range', 'selected' => 'chose_range',
'date_init' => date('Y-m-d', $values['date_init']), 'date_init' => date('Y/m/d', $values['date_init']),
'time_init' => date('H:i:s', $values['date_init']), 'time_init' => date('H:i:s', $values['date_init']),
'date_end' => date('Y-m-d', $values['date_end']), 'date_end' => date('Y/m/d', $values['date_end']),
'time_end' => date('H:i:s', $values['date_end']), 'time_end' => date('H:i:s', $values['date_end']),
'return' => true, 'return' => true,
], ],

View File

@ -12062,6 +12062,10 @@ div.relative > div > div#ui-datepicker-div {
left: 5px !important; left: 5px !important;
} }
#ui-datepicker-div .ui-datepicker-header {
background-color: white;
}
.ui-widget-overlay { .ui-widget-overlay {
background: #aaa; background: #aaa;
opacity: 0.3 !important; opacity: 0.3 !important;