Changes for page Confirmation Box

Last modified by Raphaƫl Jakse on 2023/01/19

<
From version < 14.3 >
edited by Sergiu Dumitriu
on 2012/02/16
To version < 14.4 >
edited by Manuel Smeria
on 2013/02/18
>
Change comment: minor fixes

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Sergiu
1 +XWiki.ManuelSmeria
Content
... ... @@ -1,4 +1,4 @@
1 -{{toc start=2 /}}
1 +{{toc/}}
2 2  
3 3  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.
4 4  
... ... @@ -9,7 +9,7 @@
9 9  <a href="#" onclick="javascript:new XWiki.widgets.ConfirmationBox();">Or click this link to see one live!</a>
10 10  {{/html}}
11 11  
12 -== Usage ==
12 += Usage =
13 13  
14 14  {{code language="javascript"}}
15 15  new XWiki.widgets.ConfirmationBox(behavior, interactionParameters);
... ... @@ -16,10 +16,13 @@
16 16  {{/code}}
17 17  
18 18  ; behavior
19 -: (((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).
19 +: \\
20 20  
21 -Example :
21 +(((
22 +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).
22 22  
24 +Example:
25 +
23 23  {{code language="javascript"}}
24 24  var myBehavior = {
25 25   onYes: function() {
... ... @@ -29,10 +29,15 @@
29 29   alert("Oh no :(");
30 30   }
31 31  };
32 -{{/code}})))
35 +{{/code}}
36 +)))
37 +
33 33  ; interactionParameters
34 -: (((Object that defines the different text elements displayed with-in the confirmation box. Three variables are available for customization : **confirmationText**, the message to confirm (default value for the English language is //Are you sure ?//), **yesButtonText** the "yes" button text (or confirm button), **noButtonText** the "no" button text (or cancel button).
39 +: \\
35 35  
41 +(((
42 +Object that defines the different text elements displayed within the confirmation box. Three variables are available for customization: **confirmationText** - the message to confirm (default value for the English language is //Are you sure ?//), **yesButtonText** - the "yes" button text (or confirm button), **noButtonText** - the "no" button text (or cancel button).
43 +
36 36  Example :
37 37  
38 38  {{code language="javascript"}}
... ... @@ -41,14 +41,16 @@
41 41   yesButtonText: "Yes, please do that",
42 42   noButtonText: "No thank you"
43 43  };
44 -{{/code}})))
52 +{{/code}}
53 +)))
45 45  
46 -== Source Code ==
55 += Source Code =
47 47  
48 -{{remotecode source="https://raw.github.com/xwiki/xwiki-platform/xwiki-platform-3.4/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js" /}}
57 +{{remotecode source="https://raw.github.com/xwiki/xwiki-platform/xwiki-platform-3.4/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js"/}}
49 49  
50 -==Tips==
59 += Tips =
51 51  
52 52  Check out the Javascript code:
53 -* for your wiki instance: **{{{http://localhost:8080/xwiki/bin/skin/resources/uicomponents/widgets/confirmationBox.js}}}**
54 -* from GitHub (for tag xwiki-platform-3.4): [[https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.4/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js]]
62 +
63 +* [[for your wiki instance>>http://localhost:8080/xwiki/bin/skin/resources/uicomponents/widgets/confirmationBox.js||rel="__blank"]]
64 +* [[from GitHub (for tag xwiki-platform-3.4)>>https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.4/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/widgets/confirmationBox.js||rel="__blank"]]

Get Connected