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
This commit is contained in:
parent
36f9ee5813
commit
1b2cd4c4e1
28 changed files with 199 additions and 2129 deletions
|
@ -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,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue