This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
integration-api:example [2018/08/21 15:11] tjotov |
integration-api:example [2018/08/21 15:12] tjotov |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code html> | <code html> | ||
- | <script type=" | + | |
- | | + | <html xmlns=" |
- | | + | |
- | | + | < |
- | | + | <script type=" |
- | | + | <script type=" |
- | | + | |
- | | + | <script type=" |
- | | + | var aducid = new ADUCID(); |
- | | + | $(document).ready(function() { |
- | | + | aducid.setAuthentication(); |
- | | + | aducid.setStartOperationUrl("/ |
- | | + | aducid.setResultOperationUrl("/ |
- | | + | aducid.setProxyUrl("/ |
- | | + | aducid.setRedirectUrl("/ |
- | | + | aducid.processResult = function(result) { |
- | | + | if (result.status == " |
- | | + | alert(" |
- | + | location.href = result.redirect; | |
- | | + | } |
- | | + | else { |
- | | + | alert(" |
- | | + | location.href = result.redirect; |
- | + | } | |
- | | + | } |
- | | + | |
- | | + | //handle PEIG not installed error |
- | | + | aducid.showPeigError = function() { |
- | + | alert(" | |
- | | + | } |
- | | + | |
- | | + | //handle communication or other error |
- | + | aducid.handleError = function(e) { | |
- | | + | alert(e.data.message); |
- | | + | } |
- | | + | |
- | + | aducid.showQRHint = function(param) { | |
- | | + | $('# |
- | | + | } |
- | | + | |
- | | + | aducid.showRunningHint = function(param) { |
- | + | $('# | |
- | | + | }; |
- | | + | |
- | | + | //GUI mapping |
- | </ | + | aducid.setButton($("# |
- | </ | + | aducid.setQrCode($("# |
- | < | + | aducid.setQrHint($("# |
- | + | ||
- | < | + | //start |
- | < | + | aducid.init(); |
- | <button id=" | + | }); |
- | </ | + | </ |
- | <img id=" | + | </ |
- | <div id=" | + | < |
- | + | ||
- | </ | + | < |
- | </ | + | < |
+ | <button id=" | ||
+ | </ | ||
+ | <img id=" | ||
+ | <div id=" | ||
+ | |||
+ | </ | ||
+ | </ | ||
</ | </ |