You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/js/features
Hester Gong 476a043a5f
Refactor delete_modal_actions template and use it for project column related actions (#24097)
Co-Author: @wxiaoguang 

This PR is to fix
https://github.com/go-gitea/gitea/issues/23318#issuecomment-1506275446 .
The way to fix this in this PR is to use `delete_modal_actions.tmpl`
here both to fix this issue and keep ui consistency (as suggested by
[TODO
here](4299c3b7db/templates/projects/view.tmpl (L161)))

And this PR also refactors `delete_modal_actions.tmpl` and its related
styles, and use the template for more modal actions:

1. Added template attributes:
* locale
* ModalButtonStyle: "yes" (default) or "confirm"
* ModalButtonCancelText
* ModalButtonOkText

2. Rename `delete_modal_actions.tmpl` template to
`modal_actions_confirm.tmpl` because it is not only used for action
modals deletion now.

3. Refactored css related to modals into `web_src/css/modules/modal.css`
and improved the styles.

4. Also use the template for PR deletion modal and remove issue
dependency modal.

5. Some modals should also use the template, but not sure how to open
them, so mark these modal actions by `{{/* TODO: Convert to
base/modal_actions_confirm */}}`

After (Also tested on arc green):

Hovering on the left buttons

<img width="711" alt="Screen Shot 2023-04-23 at 15 17 12"
src="https://user-images.githubusercontent.com/17645053/233825650-76307e65-9255-44bb-80e8-7062f58ead1b.png">

<img width="786" alt="Screen Shot 2023-04-23 at 15 17 21"
src="https://user-images.githubusercontent.com/17645053/233825652-4dc6f7d1-a180-49fb-a468-d60950eaee0d.png">

Test for functionalities:

https://user-images.githubusercontent.com/17645053/233826857-76376fda-022c-42d0-b0f3-339c17ca4e59.mov

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago
..
admin Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
comp Improve emoji and mention matching (#24255) 2 years ago
captcha.js Add new captcha: cloudflare turnstile (#22369) 2 years ago
citation.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
clipboard.js Use clippie module to copy to clipboard (#23801) 2 years ago
codeeditor.js Allow new file and edit file preview if it has editable extension (#23624) 2 years ago
colorpicker.js JS refactors (#22227) 2 years ago
common-global.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
common-organization.js Fix Org edit page bugs: renaming detection, maxlength (#24161) 2 years ago
contextpopup.js Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
copycontent.js Use clippie module to copy to clipboard (#23801) 2 years ago
dropzone.js JS refactors (#22227) 2 years ago
emoji.js JS refactors (#22227) 2 years ago
eventsource.sharedworker.js Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584) 3 years ago
file-fold.js Scroll collapsed file into view (#23702) 2 years ago
heatmap.js Localize activity heatmap (except tooltip) (#24131) 2 years ago
imagediff.js Fix various ImageDiff/SVG bugs (#23312) 2 years ago
install.js Fix various bugs for "install" page (#23194) 2 years ago
notification.js Move helpers to be prefixed with `gt-` (#22879) 2 years ago
org-team.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
pull-view-file.js Expand/Collapse all changed files (#23639) 2 years ago
repo-branch.js Add apply-patch, basic revert and cherry-pick functionality (#17902) 3 years ago
repo-code.js Use clippie module to copy to clipboard (#23801) 2 years ago
repo-code.test.js Ignore line anchor links with leading zeroes (#21728) 2 years ago
repo-commit.js Fix hidden commit status on multiple checks (#22889) 2 years ago
repo-common.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
repo-diff-filetree.js JS refactors (#22227) 2 years ago
repo-diff.js Fix Resolve Conversation not working in Conversation view (#24191) 2 years ago
repo-editor.js Add popup to hashed comments/pull requests/issues in file editing/adding preview tab (#24040) 2 years ago
repo-findfile.js Refactor branch/tag selector to Vue SFC (#23421) 2 years ago
repo-findfile.test.js Refactor branch/tag selector to Vue SFC (#23421) 2 years ago
repo-graph.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-home.js Sort repo topic labels by name (#24123) 2 years ago
repo-issue-content.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-issue-list.js Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 2 years ago
repo-issue-pr-form.js JS refactors (#22227) 2 years ago
repo-issue.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
repo-legacy.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
repo-migrate.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-migration.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-projects.js Refactor delete_modal_actions template and use it for project column related actions (#24097) 2 years ago
repo-release.js Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
repo-settings.js Remove customized (unmaintained) dropdown, improve aria a11y for dropdown (#19861) 3 years ago
repo-template.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-unicode-escape.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
repo-wiki.js Improve markdown editor: width, height, preferred (#23895) 2 years ago
serviceworker.js JS refactors (#22227) 2 years ago
sshkey-helper.js Use explicit jQuery import, remove unused eslint globals (#18435) 3 years ago
stopwatch.js Move helpers to be prefixed with `gt-` (#22879) 2 years ago
tablesort.js JS refactors (#22227) 2 years ago
tribute.js Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
user-auth-webauthn.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
user-auth.js Introduce eslint-plugin-no-jquery/no-event-shorthand (#24198) 2 years ago
user-settings.js Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago