diff options
author | Florian Zschocke <f.zschocke+git@gmail.com> | 2022-11-21 01:11:52 +0100 |
---|---|---|
committer | Florian Zschocke <f.zschocke+git@gmail.com> | 2022-12-03 14:33:31 +0100 |
commit | e4c23697dae5a27ec992608f0778ed7ac47a41e1 (patch) | |
tree | 9d88ae2cc1dc5248aab9954be370413b68fb1a70 /src/main/java/com | |
parent | c4fc5b38fa69036eee93758a536f65e3ac8ccb76 (diff) | |
download | gitblit-e4c23697dae5a27ec992608f0778ed7ac47a41e1.tar.gz gitblit-e4c23697dae5a27ec992608f0778ed7ac47a41e1.zip |
Add a "Copied" tooltip to the copy-to-clipboard button
This is not the ideal version, since the height is too low for the tooltip
used for the drop-down menus. Probably has something to do with the
container or something. But at least something is there now, even if
not the most beautiful.
Diffstat (limited to 'src/main/java/com')
3 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 4d30e049..b30aee97 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -171,6 +171,11 @@ public abstract class RepositoryPage extends RootPage { add(searchForm);
searchForm.setTranslatedAttributes();
+ // load clipboard library to copy repository URL
+ addBottomScript("../../clipboard/clipboard.min.js");
+ // instantiate clipboard
+ addBottomScript("../../clipboard/gitblit-ctcbtn.js");
+
// set stateless page preference
setStatelessHint(true);
}
diff --git a/src/main/java/com/gitblit/wicket/pages/SummaryPage.html b/src/main/java/com/gitblit/wicket/pages/SummaryPage.html index b6afc301..8915ecf5 100644 --- a/src/main/java/com/gitblit/wicket/pages/SummaryPage.html +++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.html @@ -62,13 +62,6 @@ </wicket:fragment>
- <!-- load clipboard library to copy repository URL -->
- <script type="text/javascript" src="clipboard/clipboard.min.js"></script>
- <!-- instantiate clipboard -->
- <script>
- var clipboard = new ClipboardJS('.ctcbtn');
- </script>
-
</wicket:extend>
</body>
</html>
\ No newline at end of file diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html index 1cadd7d5..e4b7427a 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html +++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html @@ -12,12 +12,14 @@ <wicket:fragment wicket:id="repositoryUrlFragment">
<div class="btn-toolbar" style="margin: 0px;">
- <div class="btn-group repositoryUrlContainer">
+ <div class="btn-group repositoryUrlContainer tooltipped tooltipped-w">
<img style="vertical-align: middle;padding: 0px 0px 1px 3px;" wicket:id="accessRestrictionIcon"></img>
<span wicket:id="menu"></span>
<div class="repositoryUrl">
<span wicket:id="primaryUrl">[repository primary url]</span>
- <span class="hidden-phone hidden-tablet" wicket:id="copyFunction"></span>
+ <span class="tooltipped tooltipped-n">
+ <span class="hidden-phone hidden-tablet" wicket:id="copyFunction"></span>
+ </span>
</div>
<span class="hidden-phone hidden-tablet repositoryUrlRightCap" wicket:id="primaryUrlPermission">[repository primary url permission]</span>
</div>
@@ -33,7 +35,7 @@ <wicket:fragment wicket:id="applicationMenusFragment">
<div class="btn-toolbar" style="margin: 4px 0px 0px 0px;">
- <div class="btn-group" wicket:id="appMenus">
+ <div class="btn-group tooltipped tooltipped-w" wicket:id="appMenus">
<span wicket:id="appMenu"></span>
</div>
</div>
@@ -87,7 +89,7 @@ <!-- JavaScript automatic copy to clipboard -->
<wicket:fragment wicket:id="clippyPanel">
- <img class="ctcbtn" data-clipboard-action="copy" wicket:id="copyIcon" wicket:message="title:gb.copyToClipboard" />
+ <img class="ctcbtn" wicket:id="copyIcon" wicket:message="title:gb.copyToClipboard" />
</wicket:fragment>
<wicket:fragment wicket:id="workingCopyFragment">
|