mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:06:50 +00:00
feature/The results of Create Consumer page should be copy and paste friendly 2
This commit is contained in:
parent
47ddb2e4e4
commit
53b6b966a5
@ -208,7 +208,7 @@ class ConsumerRegistration extends MdcLoggable {
|
||||
"#post-consumer-registration-more-info-link a *" #> registrationMoreInfoText &
|
||||
"#post-consumer-registration-more-info-link a [href]" #> registrationMoreInfoUrl & {
|
||||
if(HydraUtil.integrateWithHydra) {
|
||||
"#hydra-client-info-title *" #>"OAuth2" &
|
||||
"#hydra-client-info-title *" #>"OAuth2: " &
|
||||
"#admin_url *" #> HydraUtil.hydraAdminUrl &
|
||||
"#client_id *" #> {consumer.key.get} &
|
||||
"#redirect_uri *" #> consumer.redirectURL.get &
|
||||
|
||||
@ -172,7 +172,9 @@ Berlin 13359, Germany
|
||||
</div>
|
||||
<br>
|
||||
<p>Please save it in a secure location.</p>
|
||||
|
||||
<div style="cursor:pointer;text-align: right;" title="">
|
||||
<div class="fa-solid fa-copy" onclick="copyConsumerRegistrationResultToClipboard(this)" id="register-consumer-success-copy-icon" title=""></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-4">Consumer ID: </div>
|
||||
<div class="col-xs-12 col-sm-8"><span id="app-consumer_id">123</span></div>
|
||||
|
||||
6
obp-api/src/main/webapp/font-awesome/css/all.min.css
vendored
Normal file
6
obp-api/src/main/webapp/font-awesome/css/all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-brands-400.ttf
Normal file
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-brands-400.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-regular-400.ttf
Normal file
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-regular-400.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-solid-900.ttf
Normal file
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-solid-900.ttf
Normal file
Binary file not shown.
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-solid-900.woff2
Normal file
BIN
obp-api/src/main/webapp/font-awesome/webfonts/fa-solid-900.woff2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -394,3 +394,43 @@ $(document).ready(function() {
|
||||
|
||||
showIndicatorCookiePage('cookies-consent');
|
||||
});
|
||||
|
||||
// This function copies the JSON result at an API Explorer endpoint to a clipboard
|
||||
// when we press a copy icon in top left corner.
|
||||
// In case that action is successful the icon is changed for a 2 seconds in order to notify a user about it.
|
||||
function copyConsumerRegistrationResultToClipboard(element) {
|
||||
var id = String(element.id).replace('register-consumer-success-copy-icon','register-consumer-success');
|
||||
var r = document.createRange();
|
||||
r.selectNode(document.getElementById(id));
|
||||
window.getSelection().removeAllRanges();
|
||||
window.getSelection().addRange(r);
|
||||
document.execCommand('copy');
|
||||
window.getSelection().removeAllRanges();
|
||||
// Store original values
|
||||
var titleText = document.getElementById(element.id).title;
|
||||
var iconClass = document.getElementById(element.id).className;
|
||||
// and then change hey
|
||||
document.getElementById(element.id).title = "";
|
||||
document.getElementById(element.id).className = "fa-regular fa-copy";
|
||||
|
||||
// Below code is GUI related i.e. to notify a user that text is copied to clipboard
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
// It delays the call by ms milliseconds
|
||||
function defer(f, ms) {
|
||||
return function() {
|
||||
setTimeout(() => f.apply(this, arguments), ms);
|
||||
};
|
||||
}
|
||||
|
||||
// Function which revert icon and text to the initial state.
|
||||
function revertTextAndClass(titleText, iconClass) {
|
||||
document.getElementById(element.id).title = titleText;
|
||||
document.getElementById(element.id).className = iconClass
|
||||
}
|
||||
|
||||
var revertTextAndClassDeferred = defer(revertTextAndClass, 2000);
|
||||
// Revert the original values of text and icon after 2 seconds
|
||||
revertTextAndClassDeferred(titleText, iconClass);
|
||||
|
||||
}
|
||||
@ -44,7 +44,8 @@ Berlin 13359, Germany
|
||||
<link href="/media/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link id="main_style_sheet" data-lift="WebUI.mainStyleSheet" href="/media/css/website.css?201707241207" rel="stylesheet" type="text/css" />
|
||||
<link id="override_style_sheet" data-lift="WebUI.overrideStyleSheet" href="" rel="stylesheet" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="/font-awesome/css/all.min.css">
|
||||
|
||||
<script src="/media/js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="/media/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="/media/js/select2.min.js"></script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user