Skip to content

Instantly share code, notes, and snippets.

@ro0gr
Last active August 29, 2015 14:18
Show Gist options
  • Save ro0gr/c0ea0280077fe744afcd to your computer and use it in GitHub Desktop.
Save ro0gr/c0ea0280077fe744afcd to your computer and use it in GitHub Desktop.

Short Profile Widget

Short Profile Widget is responsible for representing KycNow quick information for given customer. Customer is identified by customerReference and siteName parameters.

Usage

Include shortprofile.css and shortprofile.js into your document your are able to use ShortProfile windget.

<html>
    <head>
        <link rel="stylesheet" href="https://kycnowbets10adminweb.betsson.local:5212/Content/widgets/shortprofile/shortprofile.css" />
    </head>
    <body>
    ...
    <!-- We will render widget here -->
    <div id="KycNow-Widget-ShortProfile"></div>
    ...
    <script src="https://kycnowbets10adminweb.betsson.local:5212/Content/widgets/shortprofile/shortprofile.js"></script>
    <script type="text/javascript">
        require(['KycNow/ShortProfile'], function (widget) {
            widget('#KycNow-Widget-ShortProfile', {
                customerReference: '12345ae6c2bed-34c2-48c0-a605-a8e920bb2fe1',
                siteName: 'bets10.com'
            });
        });
    </script> 
    </body>
</html>

Dependencies

ShortProfile widget packaged as an amd module. We need require.js to load widget. Also currently we have dependency on jquery .ajax() method to make CORS GET requests.

jquery=^1.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment