wxiaoguang
b573512312
Correctly query the primary button in a form ( #32438 )
...
The "primary button" is used at many places, but sometimes they might
conflict (due to button switch, hidden panel, dropdown menu, etc).
Sometimes we could add a special CSS class for the buttons, but
sometimes not (see the comment of QuickSubmit)
This PR introduces `querySingleVisibleElem` to help to get the correct
primary button (the only visible one), and prevent from querying the
wrong buttons.
Fix #32437
---------
Co-authored-by: silverwind <me@silverwind.io>
1 week ago
silverwind
5791a73e75
Convert frontend code to typescript ( #31559 )
...
None of the frontend js/ts files was touched besides these two commands
(edit: no longer true, I touched one file in
61105d0618
because of a deprecation that was not showing before the rename).
`tsc` currently reports 778 errors, so I have disabled it in CI as
planned.
Everything appears to work fine.
4 months ago
wxiaoguang
5c236bd4c0
Fix issue/PR title edit ( #30858 )
...
1. "enter" doesn't work (I think it is the last enter support for #14843 )
2. if a branch name contains something like `&`, then the branch selector doesn't update
6 months ago
wxiaoguang
8de2992ffb
Make Ctrl+Enter work for issue/comment edit ( #30720 )
...
Fix #30710
7 months ago
wxiaoguang
f95622cddc
Fix issue comment form and quick-submit ( #30623 )
...
1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery)
2. Fix issue comment form layout
7 months ago
Yarden Shoham
d8d4b33b31
Remove jQuery from the "quick submit" handler ( #29200 )
...
- Switched to plain JavaScript
- Tested the quick submit functionality and it works as before
# Demo using JavaScript without jQuery
![action](https://github.com/go-gitea/gitea/assets/20454870/abbd6c49-ad0f-4f95-b4ba-e969b85a46e8 )
---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
9 months ago
HesterG
a43ea22479
Change form actions to fetch for submit review box ( #25219 )
...
Co-author: @wxiaoguang
Close #25096
The way to fix it in this PR is to change form submit to fetch using
formData, and add flags to avoid post repeatedly.
Should be able to apply to more forms that have the same issue after
this PR.
In the demo below, 'approve' is clicked several times, and then
'comment' is clicked several time after 'request changes' clicked.
After:
https://github.com/go-gitea/gitea/assets/17645053/beabeb1d-fe66-4b76-b048-4f022b4e83a0
Update: screenshots from /devtest
>
![image](https://user-images.githubusercontent.com/2114189/245680011-ee4231e0-a53d-4c2a-a9c2-71ccd98005cc.png )
>
>
![image](https://user-images.githubusercontent.com/2114189/245680057-9215d348-63d8-406d-8828-17e171163aaa.png )
>
>
![image](https://user-images.githubusercontent.com/2114189/245680148-89d7b3d1-d7b6-442f-b69e-eadaee112482.png )
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 year ago
yp05327
c4303efc23
Support markdown editor for issue template ( #24400 )
...
Fixes #24398
Task:
- [x] Reusing "textarea" like GitHub seems more friendly to users.
- [x] ^V image pasting and file uploading handling.
<details><summary>screenshots</summary>
![image](https://user-images.githubusercontent.com/18380374/235418877-00090552-ebda-411c-8e39-b47246bc8746.png )
![image](https://user-images.githubusercontent.com/18380374/235419073-dc33cad7-7626-4bce-9161-eb205c7384b5.png )
Display only one markdown editor:
![image](https://user-images.githubusercontent.com/18380374/235419098-ee21386d-2b2d-432e-bdb2-18646cc031e7.png )
Support file upload and ^V image pasting
![image](https://user-images.githubusercontent.com/18380374/235419364-7b390fa4-da56-437d-b55e-3847fbc049e7.png )
</details>
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2 years ago
wxiaoguang
42d9a6a980
move handleGlobalEnterQuickSubmit into a separate file to avoid cycle-import ( #20679 )
2 years ago