[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Page Edit: Update "Cancel edit" button handling for improved...

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69fc805873eec_38952dd896599@gitlab-sidekiq-low-urgency-cpu-bound-v2-54d56b7869-vxzmj.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
d2a5895c by Yves Ngalamulume at 2026-05-07T11:47:23+00:00
[FIX] Page Edit: Update "Cancel edit" button handling for improved functionality in case we have the edit buttons location set to both (top and bottom)
---
* [FIX] Update cancel edit button handling for improved functionality

* [FIX] Incorrect dark color in fivealive raspberry sub-theme

* [FIX] Raspberry theme header background overridden by Bootstrap navbar color

See merge request tikiwiki/tiki!10156

- - - - -


1 changed file:

- templates/wiki_edit_actions.tpl


Changes:

=====================================
templates/wiki_edit_actions.tpl
=====================================
@@ -21,15 +21,15 @@
             {/if}
         {/if}
         {if $page|lower ne 'sandbox'}
-            <input type="button" id="cancelEditBtn" class="wikiaction btn btn-link" title="{tr}Cancel the edit (changes will be lost).{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">
+            <input type="button" class="wikiaction btn btn-link cancelEditBtn" title="{tr}Cancel the edit (changes will be lost).{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">
             {jq}
-                $("#cancelEditBtn").on('click', function () {
-                const rootPath = '{{$rootPath}}';
-                const parentForm = $(this).closest('form');
-                const actionUrl = rootPath+parentForm.attr('action');
-                const cancelUrl = new URL(actionUrl);
-                cancelUrl.searchParams.set('cancel_edit', 1);
-                window.location.href = cancelUrl.toString();
+                $(".cancelEditBtn").off('click.cancelEdit').on('click.cancelEdit', function () {
+                    const rootPath = '{{$rootPath}}';
+                    const parentForm = $(this).closest('form');
+                    const actionUrl = rootPath + parentForm.attr('action');
+                    const cancelUrl = new URL(actionUrl);
+                    cancelUrl.searchParams.set('cancel_edit', 1);
+                    window.location.href = cancelUrl.toString();
                 });
             {/jq}
         {/if}



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d2a5895ccab64c7996fba0705d18b3876ad5576a

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d2a5895ccab64c7996fba0705d18b3876ad5576a
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.