ossview.ui.js 927 B

12345678910111213141516171819202122232425262728293031323334
  1. $(function()
  2. {
  3. $.get($.createLink('system', 'ajaxOssInfo'), function(response)
  4. {
  5. let res = JSON.parse(response);
  6. if(res.result == 'success')
  7. {
  8. $('#ossAdmin').text(res.data.account.username);
  9. $('#ossPassword').val(res.data.account.password);
  10. $('#ossVisitUrl').attr('href', res.data.url);
  11. $('#ossAccountModal').modal('show');
  12. }
  13. });
  14. });
  15. function copySK()
  16. {
  17. var sk = document.getElementById('ossSK');
  18. $('#ossSK').removeClass('hidden');
  19. sk.select();
  20. document.execCommand('copy');
  21. $('#ossSK').addClass('hidden');
  22. zui.Modal.alert(copySuccess);
  23. }
  24. function copyPassBtn()
  25. {
  26. var ossPassword = document.getElementById('ossPassword');
  27. $('#ossPassword').removeClass('hidden');
  28. ossPassword.select();
  29. document.execCommand('copy');
  30. $('#ossPassword').addClass('hidden');
  31. zui.Modal.alert(copySuccess);
  32. }