summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-commit.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-08-09 14:37:34 +0200
committerGitHub <noreply@github.com>2022-08-09 14:37:34 +0200
commit1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d (patch)
treec3c9af67b599f92af60c9cd5bb7feee056d97734 /web_src/js/features/repo-commit.js
parent36f9ee5813beba0fc4b394a5db636f76afc5cc38 (diff)
downloadgitea-1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d.tar.gz
gitea-1b2cd4c4e19c78390be329b4a3ad50ff8857ca8d.zip
Replace fomantic popup module with tippy.js (#20428)
- replace fomantic popup module with tippy.js - fix chaining and add comment - add 100ms delay to tooltips - stopwatch improvments, raise default maxWidth - update web_src/js/features/common-global.js - use type=submit instead of js
Diffstat (limited to 'web_src/js/features/repo-commit.js')
-rw-r--r--web_src/js/features/repo-commit.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/web_src/js/features/repo-commit.js b/web_src/js/features/repo-commit.js
index 94fca7a9c2..aac734de26 100644
--- a/web_src/js/features/repo-commit.js
+++ b/web_src/js/features/repo-commit.js
@@ -1,4 +1,5 @@
import $ from 'jquery';
+import {createTippy} from '../modules/tippy.js';
const {csrfToken} = window.config;
@@ -58,12 +59,12 @@ export function initRepoCommitLastCommitLoader() {
export function initCommitStatuses() {
$('.commit-statuses-trigger').each(function () {
const positionRight = $('.repository.file.list').length > 0 || $('.repository.diff').length > 0;
- const popupPosition = positionRight ? 'right center' : 'left center';
- $(this)
- .popup({
- on: 'click',
- lastResort: popupPosition, // prevent error message "Popup does not fit within the boundaries of the viewport"
- position: popupPosition,
- });
+
+ createTippy(this, {
+ trigger: 'click',
+ content: this.nextSibling,
+ placement: positionRight ? 'right' : 'left',
+ interactive: true,
+ });
});
}