Fossil SCM
Correct re-labeling of the Editing... button after discarding or submiting the edit. Ensure that the editor gets scrolled into view.
Commit
4e81a9ee7b2a8666ceed08701ae0b3ff9816c58643901d791aeab2dc8d17b135
Parent
72d79e42847675f…
1 file changed
+3
-2
+3
-2
| --- src/fossil.page.forumpost.js | ||
| +++ src/fossil.page.forumpost.js | ||
| @@ -908,11 +908,11 @@ | ||
| 908 | 908 | |
| 909 | 909 | const setupEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| 910 | 910 | const fpid = ePost.dataset.fpid; |
| 911 | 911 | ePost.dataset.originalMarginLeft = ePost.style.marginLeft; |
| 912 | 912 | ePost.style.marginLeft = 'initial'; |
| 913 | - eButton.dataset.originalLabel = eButton.value; | |
| 913 | + eButton.dataset.originalLabel = eButton.innerText; | |
| 914 | 914 | D.disable(eToDisable); |
| 915 | 915 | return fpid; |
| 916 | 916 | }; |
| 917 | 917 | |
| 918 | 918 | const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| @@ -954,11 +954,10 @@ | ||
| 954 | 954 | const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{ |
| 955 | 955 | const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable); |
| 956 | 956 | const firt = ePost.dataset.firt; |
| 957 | 957 | const fEditHead = ePost.dataset.fedithead; |
| 958 | 958 | eBtnEdit.innerText = "Editing..."; |
| 959 | - F.toast.error("Edit is TODO. fpid="+fpid); | |
| 960 | 959 | /* |
| 961 | 960 | TODOs include: |
| 962 | 961 | |
| 963 | 962 | - Disable editButton. |
| 964 | 963 | |
| @@ -990,11 +989,13 @@ | ||
| 990 | 989 | edit: artifact, |
| 991 | 990 | inReplyTo: firt |
| 992 | 991 | }); |
| 993 | 992 | const w = fpe.widget; |
| 994 | 993 | w.style.borderTop = '2px dotted'; |
| 994 | + /* Adding an "Editing..." <h3> here adds way too much space */ | |
| 995 | 995 | ePost.append(w); |
| 996 | + w.scrollIntoView(); | |
| 996 | 997 | }); |
| 997 | 998 | }/*editClicked()*/; |
| 998 | 999 | |
| 999 | 1000 | document.body.querySelectorAll( |
| 1000 | 1001 | '.forumpost-single-controls > form' |
| 1001 | 1002 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -908,11 +908,11 @@ | |
| 908 | |
| 909 | const setupEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| 910 | const fpid = ePost.dataset.fpid; |
| 911 | ePost.dataset.originalMarginLeft = ePost.style.marginLeft; |
| 912 | ePost.style.marginLeft = 'initial'; |
| 913 | eButton.dataset.originalLabel = eButton.value; |
| 914 | D.disable(eToDisable); |
| 915 | return fpid; |
| 916 | }; |
| 917 | |
| 918 | const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| @@ -954,11 +954,10 @@ | |
| 954 | const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{ |
| 955 | const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable); |
| 956 | const firt = ePost.dataset.firt; |
| 957 | const fEditHead = ePost.dataset.fedithead; |
| 958 | eBtnEdit.innerText = "Editing..."; |
| 959 | F.toast.error("Edit is TODO. fpid="+fpid); |
| 960 | /* |
| 961 | TODOs include: |
| 962 | |
| 963 | - Disable editButton. |
| 964 | |
| @@ -990,11 +989,13 @@ | |
| 990 | edit: artifact, |
| 991 | inReplyTo: firt |
| 992 | }); |
| 993 | const w = fpe.widget; |
| 994 | w.style.borderTop = '2px dotted'; |
| 995 | ePost.append(w); |
| 996 | }); |
| 997 | }/*editClicked()*/; |
| 998 | |
| 999 | document.body.querySelectorAll( |
| 1000 | '.forumpost-single-controls > form' |
| 1001 |
| --- src/fossil.page.forumpost.js | |
| +++ src/fossil.page.forumpost.js | |
| @@ -908,11 +908,11 @@ | |
| 908 | |
| 909 | const setupEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| 910 | const fpid = ePost.dataset.fpid; |
| 911 | ePost.dataset.originalMarginLeft = ePost.style.marginLeft; |
| 912 | ePost.style.marginLeft = 'initial'; |
| 913 | eButton.dataset.originalLabel = eButton.innerText; |
| 914 | D.disable(eToDisable); |
| 915 | return fpid; |
| 916 | }; |
| 917 | |
| 918 | const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{ |
| @@ -954,11 +954,10 @@ | |
| 954 | const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{ |
| 955 | const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable); |
| 956 | const firt = ePost.dataset.firt; |
| 957 | const fEditHead = ePost.dataset.fedithead; |
| 958 | eBtnEdit.innerText = "Editing..."; |
| 959 | /* |
| 960 | TODOs include: |
| 961 | |
| 962 | - Disable editButton. |
| 963 | |
| @@ -990,11 +989,13 @@ | |
| 989 | edit: artifact, |
| 990 | inReplyTo: firt |
| 991 | }); |
| 992 | const w = fpe.widget; |
| 993 | w.style.borderTop = '2px dotted'; |
| 994 | /* Adding an "Editing..." <h3> here adds way too much space */ |
| 995 | ePost.append(w); |
| 996 | w.scrollIntoView(); |
| 997 | }); |
| 998 | }/*editClicked()*/; |
| 999 | |
| 1000 | document.body.querySelectorAll( |
| 1001 | '.forumpost-single-controls > form' |
| 1002 |