Wednesday, 28 September 2016

Microsoft Ofiice Fabric UI Alert and Confirmation Dialog box for Office 365 SharePoint

Problem Statement: Need to have Alert and Confirmation Dialog box for Office 365 SharePoint with all devices ( Mobile, Tablet, Desktop) supported.

Solution:
Microsoft has come up Office Fabric UI framework which works in all devices.

We need to include the Fabric UI css reference  in our HTML and then we can use it.

CSS Ref  URL https://dev.office.com/Modules/DevOffice.Fabric/Fabric/components/Dialog/Dialog.css

Below code sample to get the Alert and confirmation dialog in Javascript. You can customize these method for your need. you can use this framework for a Dialog form as well.

Code:

code is hidden, please use View source and get the code

Function names are AlertDialog and ConfirmationDialog.

if any issue let me know