diff --git a/src/main/twirl/gitbucket/core/account/application.scala.html b/src/main/twirl/gitbucket/core/account/application.scala.html index 2df999b..fd3b8e7 100644 --- a/src/main/twirl/gitbucket/core/account/application.scala.html +++ b/src/main/twirl/gitbucket/core/account/application.scala.html @@ -19,7 +19,7 @@ Delete
- @gitbucket.core.helper.html.copy("generated-token-copy", tokenString, targetTextId = "generated-token"){ + @gitbucket.core.helper.html.copy("generated-token", "generated-token-copy", tokenString){ }
diff --git a/src/main/twirl/gitbucket/core/helper/copy.scala.html b/src/main/twirl/gitbucket/core/helper/copy.scala.html index b02973c..bdf099e 100644 --- a/src/main/twirl/gitbucket/core/helper/copy.scala.html +++ b/src/main/twirl/gitbucket/core/helper/copy.scala.html @@ -1,31 +1,30 @@ -@(id: String, value: String, style: String = "", targetTextId: String = "")(html: Html = Html("")) +@(targetTextId: String, copyButtonId: String, value: String, style: String = "")(html: Html = Html("")) @if(html.body.nonEmpty){
@html -
} else { - } diff --git a/src/main/twirl/gitbucket/core/pulls/mergeguide.scala.html b/src/main/twirl/gitbucket/core/pulls/mergeguide.scala.html index 2f20b58..7a10072 100644 --- a/src/main/twirl/gitbucket/core/pulls/mergeguide.scala.html +++ b/src/main/twirl/gitbucket/core/pulls/mergeguide.scala.html @@ -99,7 +99,7 @@ you can perform a manual merge on the command line.

} - @gitbucket.core.helper.html.copy("repository-url-copy", forkedRepository.httpUrl, targetTextId = "repository-url"){ + @gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", forkedRepository.httpUrl){
@if(context.settings.ssh && context.loginAccount.isDefined){ @@ -114,7 +114,7 @@

@defining(s"git checkout -b ${pullreq.requestUserName}-${pullreq.requestBranch} ${pullreq.branch}\n" + s"git pull ${forkedRepository.httpUrl} ${pullreq.requestBranch}"){ command => - @gitbucket.core.helper.html.copy("merge-command-copy-1", command, "position: absolute; right: 31px;", "merge-command")() + @gitbucket.core.helper.html.copy("merge-command", "merge-command-copy-1", command, "position: absolute; right: 31px;")()
@Html(command)
}
@@ -124,7 +124,7 @@

@defining(s"git checkout ${pullreq.branch}\ngit merge --no-ff ${pullreq.requestUserName}-${pullreq.requestBranch}\n" + s"git push origin ${pullreq.branch}"){ command => - @gitbucket.core.helper.html.copy("merge-command-copy-2", command, "position: absolute; right: 31px;", "merge-command-2")() + @gitbucket.core.helper.html.copy("merge-command-2", "merge-command-copy-2", command, "position: absolute; right: 31px;")()
@command
} diff --git a/src/main/twirl/gitbucket/core/repo/files.scala.html b/src/main/twirl/gitbucket/core/repo/files.scala.html index 171fa4f..d76d5fc 100644 --- a/src/main/twirl/gitbucket/core/repo/files.scala.html +++ b/src/main/twirl/gitbucket/core/repo/files.scala.html @@ -39,7 +39,7 @@
- @gitbucket.core.helper.html.copy("repository-url-copy", repository.httpUrl, targetTextId = "repository-url"){ + @gitbucket.core.helper.html.copy("repository-url", "repository-url-copy", repository.httpUrl){ @if(repository.sshUrl.isDefined){