diff options
author | Florian Zschocke <f.zschocke+git@gmail.com> | 2022-11-20 18:53:26 +0100 |
---|---|---|
committer | Florian Zschocke <f.zschocke+git@gmail.com> | 2022-11-20 18:53:26 +0100 |
commit | c4fc5b38fa69036eee93758a536f65e3ac8ccb76 (patch) | |
tree | a798ca6ef52f1b8166eff735f4b8b097ca36f1fb /src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html | |
parent | c84179a751da1e4bb84e7d30ff848c0d197ec6a2 (diff) | |
download | gitblit-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.html | 12 |
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">
|