The Confirmation Box UI is an alternative to the old-fashioned browsers confirm boxes. It displays a nice popup box asking the user to confirm an action. Functions hooks are available on both confirm and cancel actions
Usage
new XWiki.widgets.ConfirmationBox(behavior, interactionParameters)
- behavior
- Object that define confirm and cancel handlers. When the user chooses "Yes", its "onYes" method is triggered if it exists. When the user chooses "No", its "onNo" method is triggered, if it exists. The behavior parameter is not mandatory and is empty by default (It means nothing will happen upon confirmation or cancel).
Example :
var myBehavior = {
onYes: function() {
alert("Yes !");
},
onNo: function() {
alert("Oh no :(");
}
}
onYes: function() {
alert("Yes !");
},
onNo: function() {
alert("Oh no :(");
}
}
- internationParameters
- Object that defines the different text elements displayed with-in the confirmation box.
Source Code (for tag xwiki-web-2.0)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.62 (Debian) Server at www.xwiki.org Port 443</address>
</body></html>
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.62 (Debian) Server at www.xwiki.org Port 443</address>
</body></html>