on 10-06-2015 9:19 PM
Dear All
I am trying to modify the AFP Masthead, need to add a link which will open up a pop up similar to what happens when you click on log off. Seems like the Logoff uses NovaaDialogBox to create the pop up and the buttons have event handlers.
Is there a way I can assign custom event handlers? How do I get access to the event handler? Is there any documentation available?
I am creating the dialog box as such
var aS = NovaDialogBox.createMessageDialogBox("Old Link","This will open the Old Link in a new browser window.",
'Open',"Cancel", "260", "126");
AccessibilityManager.setItemOpenerElement(oldLink);
I need to open a new window when the user clicks on 'Open' .... How do I get access to the event handler for Open Button? By default Open button is assigned to Log out action.
Any help here please.
Thanks
Sandip Agarwalla
Hi Sandip,
Unfortunately the NovaDialog doesn't expose an API for this.
However since it returns the markup it's rather easy to overwrite it.
var myBox = NovaDialogBox.createMessageDialogBox("myTitle","myYesButton","myNoButton",myWidth,myHeight, isDraggable);
var buttonYes = NovaDialogBoxButton.createNovaDialogBoxButton("button_std_yes",yes_button, actionToPerform,"EMPH");
buttonYes.addEventListener("click",function(evt){
console.log("yes was clicked");
},false);
buttonNo.addEventListener("click",function(evt){
console.log("no was clicked");
},false);
var buttonNo = NovaDialogBoxButton.createNovaDialogBoxButton("button_std_no",no_button, "NovaDialogBox.closeDialogBox()","STD");
//create container for buttons (you will need to take care of their styling)
var div = document.createElement("div");
div.appendChild(buttonYes);
div.appendChild(buttonNo);
document.getElementById("nova_dialog_box_buttons_pannel_id").innerHTML = div.innerHTML;
Play around with this implementation.
However as I reminded above --- this is not an exposed API --- meaning you will need to handle styling and maybe small issues.
BR,
Saar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.