#12143 fix datepicker dashboard widget hardening
This commit is contained in:
parent
70d8b344b7
commit
88784de3ef
|
@ -22,6 +22,9 @@ function show_option_dialog(settings) {
|
||||||
method: "updateDashboard",
|
method: "updateDashboard",
|
||||||
dataType: "json"
|
dataType: "json"
|
||||||
},
|
},
|
||||||
|
oncancel: {
|
||||||
|
reload: true
|
||||||
|
},
|
||||||
ajax_callback: update_dashboard
|
ajax_callback: update_dashboard
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -458,6 +461,10 @@ function initialiceLayout(data) {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
function configurationWidget(cellId, widgetId, size) {
|
function configurationWidget(cellId, widgetId, size) {
|
||||||
|
var reload = 0;
|
||||||
|
if (widgetId == 46) {
|
||||||
|
reload = 1;
|
||||||
|
}
|
||||||
load_modal({
|
load_modal({
|
||||||
target: $("#modal-config-widget"),
|
target: $("#modal-config-widget"),
|
||||||
form: "form-config-widget",
|
form: "form-config-widget",
|
||||||
|
@ -483,8 +490,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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,6 +168,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();
|
||||||
}
|
}
|
||||||
|
@ -347,6 +349,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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
],
|
],
|
||||||
|
|
|
@ -12048,6 +12048,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;
|
||||||
|
|
Loading…
Reference in New Issue