From 3ecaff5454a5450ad6c50652e01b7f509cf55eb7 Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 월, 20 12월 2021 17:37:54 +0900 Subject: [PATCH] API 토큰 복사 버튼 생성 --- src/main/webapp/views/api/apiAuth.html | 1 + src/main/webapp/scripts/app/api/apiAuth.controller.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/scripts/app/api/apiAuth.controller.js b/src/main/webapp/scripts/app/api/apiAuth.controller.js index fb542b1..eda67ae 100644 --- a/src/main/webapp/scripts/app/api/apiAuth.controller.js +++ b/src/main/webapp/scripts/app/api/apiAuth.controller.js @@ -14,7 +14,8 @@ formSubmit : formSubmit, remove : remove, find : find, - formCheck : formCheck + formCheck : formCheck, + copyToken : copyToken }; $scope.vm = { @@ -74,6 +75,17 @@ }); } + function copyToken() { + var copyText = document.getElementById("apiApplicationForm2"); + + copyText.select(); + copyText.setSelectionRange(0, 99999); + + navigator.clipboard.writeText(copyText.value); + + SweetAlert.swal($filter("translate")("api.successToApiTokenCopy")); // "api �넗�겙 �깮�꽦 �꽦怨�" + } + function find() { var conditions = { appName : $scope.vm.form.appName diff --git a/src/main/webapp/views/api/apiAuth.html b/src/main/webapp/views/api/apiAuth.html index 21c7a6e..0bebb25 100644 --- a/src/main/webapp/views/api/apiAuth.html +++ b/src/main/webapp/views/api/apiAuth.html @@ -45,6 +45,7 @@ ng-disabled="fn.formCheck(apiTokenAddForm.$invalid)" ng-click="fn.formSubmit()"><span translate="api.create">�깮�꽦</span> </button> + <button type="button" class="btn btn-md btn-grey float-right" ng-click="fn.copyToken()"><span translate="api.ApiTokenCopy">�넗�겙 蹂듭궗</span></button> </div> </div> </div> -- Gitblit v1.8.0