summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
diff options
context:
space:
mode:
authorFlorian Zschocke <f.zschocke+git@gmail.com>2022-11-20 18:53:26 +0100
committerFlorian Zschocke <f.zschocke+git@gmail.com>2022-11-20 18:53:26 +0100
commitc4fc5b38fa69036eee93758a536f65e3ac8ccb76 (patch)
treea798ca6ef52f1b8166eff735f4b8b097ca36f1fb /src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
parentc84179a751da1e4bb84e7d30ff848c0d197ec6a2 (diff)
downloadgitblit-c4fc5b38fa69036eee93758a536f65e3ac8ccb76.tar.gz
gitblit-c4fc5b38fa69036eee93758a536f65e3ac8ccb76.zip
Replace SWF clippy with clipboardjs on repository page
Shockwave Flash is dead. But Gitblit still uses it to copy the repository URLs to the clip board. Which doesn't work anymore since no browser uses Flash anymore, so this has degraded disgracefully. Instead, we can use JavaScript to copy directly to the clipboard, now that there are APIs for it. So replace the use of clippy.swf on the repository page with clipboard.js[1]. This right now only has the functionality to copy to clipboard but now visual feedback, yet. This addresses GH issue #1241. [1] https://clipboardjs.com
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
index a537277f..1cadd7d5 100644
--- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
@@ -85,17 +85,9 @@
</span>
</wicket:fragment>
- <!-- flash-based button-press copy & paste -->
+ <!-- JavaScript automatic copy to clipboard -->
<wicket:fragment wicket:id="clippyPanel">
- <object wicket:message="title:gb.copyToClipboard" style="vertical-align:middle;"
- wicket:id="clippy"
- width="14"
- height="14"
- bgcolor="#ffffff"
- quality="high"
- wmode="transparent"
- scale="noscale"
- allowScriptAccess="sameDomain"></object>
+ <img class="ctcbtn" data-clipboard-action="copy" wicket:id="copyIcon" wicket:message="title:gb.copyToClipboard" />
</wicket:fragment>
<wicket:fragment wicket:id="workingCopyFragment">