Server IP : 150.95.80.236 / Your IP : 3.147.2.111 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/js/custom/account/api-keys/ |
Upload File : |
"use strict"; // Class definition var KTAccountAPIKeys = function () { // Private functions var initLicenceCopy = function() { KTUtil.each(document.querySelectorAll('#kt_api_keys_table [data-action="copy"]'), function(button) { var tr = button.closest('tr'); var license = KTUtil.find(tr, '[data-bs-target="license"]'); var clipboard = new ClipboardJS(button, { target: license, text: function() { return license.innerHTML; } }); clipboard.on('success', function(e) { // Icons var svgIcon = button.querySelector('.svg-icon'); var checkIcon = button.querySelector('.bi.bi-check'); // exit if check icon is already shown if (checkIcon) { return; } // Create check icon checkIcon = document.createElement('i'); checkIcon.classList.add('bi'); checkIcon.classList.add('bi-check'); checkIcon.classList.add('fs-2x'); // Append check icon button.appendChild(checkIcon); // Highlight target license.classList.add('text-success'); // Hide copy icon svgIcon.classList.add('d-none'); // Set 3 seconds timeout to hide the check icon and show copy icon back setTimeout(function() { // Remove check icon svgIcon.classList.remove('d-none'); // Show check icon back button.removeChild(checkIcon); // Remove highlight license.classList.remove('text-success'); }, 3000); }); }); } // Public methods return { init: function () { initLicenceCopy(); } } }(); // On document ready KTUtil.onDOMContentLoaded(function() { KTAccountAPIKeys.init(); });