[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][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 <69fdb85cef459_382fe368c17983@gitlab-sidekiq-low-urgency-cpu-bound-v2-6746cb7cfd-lh54t.mail>

luci pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
2b232db1 by Yves Ngalamulume at 2026-05-08T10:10:07+00:00
[BP][FIX] Page Edit: Update "Cancel edit" button handling for improved...
---
* [BP][FIX] Page Edit: Update "Cancel edit" button handling for improved...
---
* [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

See merge request tikiwiki/tiki!10157

See merge request tikiwiki/tiki!10165

- - - - -


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/2b232db176247f032c0277edf270b0403454b7df

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2b232db176247f032c0277edf270b0403454b7df
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.