[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results
"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69849d4127fbf_3b1849d016941@gitlab-sidekiq-low-urgency-cpu-bound-v2-7df966bb7-2pqxk.mail> |
Jean-Marc Kadimba pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki Commits: 77c33c35 by Jean-Marc Kadimba at 2026-02-05T15:38:00+02:00 [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results --- * [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results * [FIX] fix phpcs * [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results * [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results See merge request tikiwiki/tiki!9441 (cherry picked from commit 62a9f037ee9baa5b99fecc59749998e50ebf6332) bdd30e80 [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results 97e1337f [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results f3b9dc6a [FIX] fix phpcs 996b58f7 [FIX] Wikiplugin CustomSearch: Fix an issue with the download search results Co-authored-by: Jean-Marc Kadimba <[email protected]> (cherry picked from commit 29857c4d950d4f3e24d0d2885c31f57a6286a675) Co-authored-by: Jean-Marc Kadimba <[email protected]> (cherry picked from commit 663aa6dc540729267c3b47ee9eaf5818ceca9c4d) Co-authored-by: Jean-Marc Kadimba <[email protected]> - - - - - 1 changed file: - lib/wiki-plugins/wikiplugin_customsearch.php Changes: ===================================== lib/wiki-plugins/wikiplugin_customsearch.php ===================================== @@ -572,6 +572,22 @@ customsearch$id._load = function (receive, params) { if (typeof params !== undefined) { $.extend(datamap, params); } + if (datamap.download) { + let form = $('<form method=\"post\" action=\"'+$.service('search_customsearch', 'customsearch')+'\"></form>'); + $.param(datamap).split('&').forEach(function(pair) { + let parts = pair.split('='); + let name = decodeURIComponent(parts[0]); + let value = decodeURIComponent(parts[1] || ''); + form.append($('<input>').attr({ + type: 'hidden', + name: name, + value: value + })); + }); + form.appendTo('body').submit(); + return; + } + $.ajax({ type: 'POST', url: $.service('search_customsearch', 'customsearch'), @@ -600,6 +616,11 @@ customsearch$id.maxRecords = $maxRecords; customsearch$id.store_query =''; customsearch$id.init(); $iconinsert; +$(document).on('submit', '#listexecute-download-wpcs-$id, #listexecute-download-top-wpcs-$id', function(e) { + e.preventDefault(); + customsearch$id._load(null, {download: true}); + return false; +}); $(document).trigger('formSearchReady'); "; View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/77c33c353cdfde9d48a0cb3887677308a48f4791 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/77c33c353cdfde9d48a0cb3887677308a48f4791 You're receiving this email because of your account on gitlab.com. _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs