diff options
Diffstat (limited to 'web_src/js/features/repo-issue.js')
-rw-r--r-- | web_src/js/features/repo-issue.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 12900c2455..9dbe78edf5 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -4,6 +4,7 @@ import attachTribute from './tribute.js'; import {createCommentEasyMDE, getAttachedEasyMDE} from './comp/EasyMDE.js'; import {initEasyMDEImagePaste} from './comp/ImagePaste.js'; import {initCompMarkupContentPreviewTab} from './comp/MarkupContentPreview.js'; +import {initTooltip, showTemporaryTooltip} from '../modules/tippy.js'; const {appSubUrl, csrfToken} = window.config; @@ -278,7 +279,8 @@ export function initRepoPullRequestAllowMaintainerEdit() { const promptTip = $checkbox.attr('data-prompt-tip'); const promptError = $checkbox.attr('data-prompt-error'); - $checkbox.popup({content: promptTip}); + + initTooltip($checkbox[0], {content: promptTip}); $checkbox.checkbox({ 'onChange': () => { const checked = $checkbox.checkbox('is checked'); @@ -288,14 +290,7 @@ export function initRepoPullRequestAllowMaintainerEdit() { $.ajax({url, type: 'POST', data: {_csrf: csrfToken, allow_maintainer_edit: checked}, error: () => { - $checkbox.popup({ - content: promptError, - onHidden: () => { - // the error popup should be shown only once, then we restore the popup to the default message - $checkbox.popup({content: promptTip}); - }, - }); - $checkbox.popup('show'); + showTemporaryTooltip($checkbox[0], promptError); }, complete: () => { $checkbox.checkbox('set enabled'); |