Is there a way to disable the popup confirmation messages? It's really not necessary to have to confirm that I want to log out if I click the logout button or that I want to close the page when I try to leave the site.
Logout -> "Are you sure you want to log out?" -> YES!!! -> Ok, logout -> Close the webpage -> "Do you really want to leave the page?" -> YES!!! FFS CLOSE ALREADY!!
Solution:
To disable the prompt when leaving the page:
Modify /usr/share/php/openmediavault/htmlpage.inc
Find: "OMV.confirmPageUnload = true;" and change it to "OMV.confirmPageUnload = false;"
// Request user confirmation before leaving page.
OMV.confirmPageUnload = false;
window.onbeforeunload = function() {
if(true === OMV.confirmPageUnload) {
OMV.confirmPageUnload = false;
return _("Do you really want to leave the page?");
}
Disabling the logout nag is a little more complicated. Need to modify /var/www/openmediavault/js/omv/workspace/Workspace.js
Find this bit of code:
listeners: {
click: function(menu, item, e, eOpts) {
if(!Ext.isDefined(item.action))
return;
OMV.MessageBox.show({
title: _("Confirmation"),
msg: item.msg,
buttons: Ext.Msg.YESNO,
fn: function(answer) {
and add the following lines after "if(!Ext.isDefined(item.action))return;"
So it should look like this after modified:
listeners: {
click: function(menu, item, e, eOpts) {
if(!Ext.isDefined(item.action))
return;
if(item.action == "logout") {
OMV.SessionManager.logout();
return; }
OMV.MessageBox.show({
title: _("Confirmation"),
msg: item.msg,
OMV Erasmus 3.0.13.