mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 19:54:24 +02:00
Fix issue processwire/processwire-issues#188 to provide more detailed warning message when installing module that doesn't meet requirements
This commit is contained in:
@@ -386,15 +386,18 @@ var ProcessWireAdmin = {
|
||||
|
||||
if(typeof ProcessWire != "undefined") {
|
||||
ProcessWire.confirm = function(message, func) {
|
||||
if(typeof vex != "undefined") {
|
||||
if(typeof vex != "undefined" && typeof func != "undefined") {
|
||||
vex.dialog.confirm({
|
||||
message: message,
|
||||
callback: function(v) {
|
||||
if(v) func();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if(typeof func != "undefined") {
|
||||
if(confirm(message)) func();
|
||||
} else {
|
||||
// regular JS confirm behavior
|
||||
return confirm(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user