Friday, July 18, 2014

How to display prompt in Alfresco Share

How to display prompt in Alfresco Share?




Alfresco.util.PopupManager.displayPrompt(
     {
        title: "Prompt Title",
        text: "Do you want to close the screen?",
        buttons: [
        {
           text: "Close",
           handler: function close_screen()
           {
                //Your javascript goes here
                this.destroy();
           }
        },
        {
           text: "Cancel",
           handler: function close_cancel()
           {
              this.destroy();
           },
           isDefault: true
        }]
     }); 





Hope this helps someone!



5 comments:

  1. Muralidharan Deenathayalan
    thank you for your good blog,

    ReplyDelete
  2. what is the use of isDefault: true in this script

    ReplyDelete
  3. what is the use of isDefault: true in this script

    ReplyDelete
    Replies
    1. It is used to set, which button should be selected by default.
      In this example,Cancel button is set to default selection.

      Delete