Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fed27b

Browse files
authored
Fix various problems (#34708)
*Fix#34707* Fix dropdown filter handling*Fix#27014
1 parent65986f4 commit8fed27b

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

‎cmd/serv.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func runServ(ctx context.Context, c *cli.Command) error {
212212
ifgit.DefaultFeatures().SupportProcReceive {
213213
// for AGit Flow
214214
ifcmd=="ssh_info" {
215-
fmt.Print(`{"type":"gitea","version":1}`)
215+
fmt.Print(`{"type":"agit","version":1}`)
216216
returnnil
217217
}
218218
}

‎routers/web/misc/misc.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func SSHInfo(rw http.ResponseWriter, req *http.Request) {
2020
return
2121
}
2222
rw.Header().Set("content-type","text/json;charset=UTF-8")
23-
_,err:=rw.Write([]byte(`{"type":"gitea","version":1}`))
23+
_,err:=rw.Write([]byte(`{"type":"agit","version":1}`))
2424
iferr!=nil {
2525
log.Error("fail to write result: err: %v",err)
2626
rw.WriteHeader(http.StatusInternalServerError)

‎web_src/fomantic/build/components/dropdown.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ $.fn.dropdown = function(parameters) {
525525
returntrue;
526526
}
527527
if(settings.onShow.call(element)!==false){
528+
settings.onAfterFiltered.call(element);// GITEA-PATCH: callback to correctly handle the filtered items
528529
module.animate.show(function(){
529530
if(module.can.click()){
530531
module.bind.intent();

‎web_src/js/features/common-fetch-action.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ async function fetchActionDoRequest(actionElem: HTMLElement, url: string, opt: R
5656
actionElem.classList.remove('is-loading','loading-icon-2px');
5757
}
5858

59-
asyncfunctionformFetchAction(formEl:HTMLFormElement,e:SubmitEvent){
59+
asyncfunctiononFormFetchActionSubmit(formEl:HTMLFormElement,e:SubmitEvent){
6060
e.preventDefault();
61+
awaitsubmitFormFetchAction(formEl,submitEventSubmitter(e));
62+
}
63+
64+
exportasyncfunctionsubmitFormFetchAction(formEl:HTMLFormElement,formSubmitter?:HTMLElement){
6165
if(formEl.classList.contains('is-loading'))return;
6266

6367
formEl.classList.add('is-loading');
@@ -68,7 +72,6 @@ async function formFetchAction(formEl: HTMLFormElement, e: SubmitEvent) {
6872
constformMethod=formEl.getAttribute('method')||'get';
6973
constformActionUrl=formEl.getAttribute('action');
7074
constformData=newFormData(formEl);
71-
constformSubmitter=submitEventSubmitter(e);
7275
const[submitterName,submitterValue]=[formSubmitter?.getAttribute('name'),formSubmitter?.getAttribute('value')];
7376
if(submitterName){
7477
formData.append(submitterName,submitterValue||'');
@@ -96,7 +99,7 @@ async function formFetchAction(formEl: HTMLFormElement, e: SubmitEvent) {
9699
awaitfetchActionDoRequest(formEl,reqUrl,reqOpt);
97100
}
98101

99-
asyncfunctionlinkAction(el:HTMLElement,e:Event){
102+
asyncfunctiononLinkActionClick(el:HTMLElement,e:Event){
100103
// A "link-action" can post AJAX request to its "data-url"
101104
// Then the browser is redirected to: the "redirect" in response, or "data-redirect" attribute, or current URL by reloading.
102105
// If the "link-action" has "data-modal-confirm" attribute, a confirm modal dialog will be shown before taking action.
@@ -126,6 +129,6 @@ async function linkAction(el: HTMLElement, e: Event) {
126129
}
127130

128131
exportfunctioninitGlobalFetchAction(){
129-
addDelegatedEventListener(document,'submit','.form-fetch-action',formFetchAction);
130-
addDelegatedEventListener(document,'click','.link-action',linkAction);
132+
addDelegatedEventListener(document,'submit','.form-fetch-action',onFormFetchActionSubmit);
133+
addDelegatedEventListener(document,'click','.link-action',onLinkActionClick);
131134
}

‎web_src/js/features/comp/LabelEdit.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import{toggleElem}from'../../utils/dom.ts';
22
import{fomanticQuery}from'../../modules/fomantic/base.ts';
3+
import{submitFormFetchAction}from'../common-fetch-action.ts';
34

45
functionnameHasScope(name:string):boolean{
56
return/.*[^/]\/[^/].*/.test(name);
@@ -70,7 +71,7 @@ export function initCompLabelEdit(pageSelector: string) {
7071
form.reportValidity();
7172
returnfalse;
7273
}
73-
form.dispatchEvent(newEvent('submit',{bubbles:true}));
74+
submitFormFetchAction(form);
7475
},
7576
}).modal('show');
7677
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp