[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] maps: Popups and indexing
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a96e4fa77446_389e1e701cd@gitlab-sidekiq-low-urgency-cpu-bound-v2-58d48c47b5-b24tb.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 9b04c1e0 by Jonny Bradley at 2026-09-01T14:38:29+00:00 [FIX] maps: Popups and indexing --- * [FIX] maps: Popups and indexing --- * [FIX] maps: Partially revert facba26f - handling for arcgis maps isn't finished and the delay option for `popover` is ignored when `trigger: "manual"` * [FIX] maps: Improve popup hide behaviour by adding a delay when the mouse leaves the popup object (and cancel it when re-entering) * [FIX] trackers: Keep the same `sortable` field type for the main indexed field when Files firld is in `indexGeometry` mode * [FIX] trackers: Replace long removed `service-dialog` class with `click-modal` on infobox edit and delete links * [FIX] maps: One fire the popover for the first matched feature in 'popup' mode and don't hide the edit and delete links See merge request tikiwiki/tiki!11105 (cherry picked from commit 35f79a71b89f1bc9de34c59c477241e107705e1e) d2d515f5 [FIX] maps: One fire the popover for the first matched feature in 'popup' mode... 3651befb [FIX] trackers: Replace long removed `service-dialog` class with `click-modal`... ef5fc772 [FIX] trackers: Keep the same `sortable` field type for the main indexed field... facba26f [FIX] maps: Improve popup hide behaviour by adding a delay when the mouse... 2b38b38c [FIX] maps: Partially revert facba26f - handling for arcgis maps isn't... Co-authored-by: Jonny Bradley <[email protected]> See merge request tikiwiki/tiki!11107 - - - - - 3 changed files: - lib/core/Tracker/Field/Files.php - src/js/jquery-tiki/tiki-maps.js - templates/object/infobox/trackeritem.tpl Changes: ===================================== lib/core/Tracker/Field/Files.php ===================================== @@ -1093,7 +1093,7 @@ class Tracker_Field_Files extends \Tracker\Field\AbstractItemField implements \T 'geo_located' => $typeFactory->identifier('y'), 'geo_file' => $typeFactory->identifier(implode(',', $urls)), 'geo_file_format' => $typeFactory->identifier($this->getOption('indexGeometry')), - $baseKey => $typeFactory->identifier($value), + $baseKey => $typeFactory->sortable($value), ]; } else { $fileIds = array_filter(explode(',', $value)); ===================================== src/js/jquery-tiki/tiki-maps.js ===================================== @@ -1267,7 +1267,7 @@ import { defaults as defaultControls } from "ol/control"; placement: "auto", }) .popover("show") - .on("shown.bs.popover", function (event) { + .one("shown.bs.popover", function (event) { const $popover = $(".popover.show").first(); let $h3 = $popover.find("h3").text(""); if ($h3.length === 0) { @@ -1284,16 +1284,9 @@ import { defaults as defaultControls } from "ol/control"; event: event, element: this, callback: function (event, $html) { - $html.find("a.service-dialog").remove(); const title = $html.find("h1").remove().text() || feature.get("content"); $("h3", $popover).text(title); $(".popover-body", $popover).empty().html($html.html()); - $popover.on("mouseleave", function () { - $popover.find("h3").text(""); - $popover.find(".popover-body").empty(); - $mapBootstrapPopoverDummy.popover("dispose"); - selectionInteraction.getFeatures().clear(); - }); }, }); } else { @@ -1301,13 +1294,22 @@ import { defaults as defaultControls } from "ol/control"; // just a marker, info it in the link $popover.find("h3").text($el.text()); $popover.find(".popover-body").empty().text($el.attr("title")); - $popover.on("mouseleave", function () { + } + let timeout = 0; + $popover.on("mouseleave", function () { + timeout = setTimeout(function () { $popover.find("h3").text(""); $popover.find(".popover-body").empty(); - $mapBootstrapPopoverDummy.popover("hide"); + $mapBootstrapPopoverDummy.popover("dispose"); selectionInteraction.getFeatures().clear(); - }); - } + }, 1000); + }); + $popover.on("mouseenter", function () { + if (timeout) { + clearTimeout(timeout); + timeout = 0; + } + }); }); break; } ===================================== templates/object/infobox/trackeritem.tpl ===================================== @@ -14,8 +14,8 @@ {/foreach} {/if} {if $can_modify} - <a class="service-dialog tips" href="{service controller=tracker action=update_item trackerId=$item.trackerId itemId=$item.itemId}" title=":{tr}Edit{/tr}">{icon name="edit"} <span>{tr}Edit{/tr}</span></a> + <a class="click-modal tips" href="{service controller=tracker action=update_item trackerId=$item.trackerId itemId=$item.itemId}" title=":{tr}Edit{/tr}">{icon name="edit"} <span>{tr}Edit{/tr}</span></a> {/if} {if $can_remove} - <a class="service-dialog tips" href="{service controller=tracker action=remove_item trackerId=$item.trackerId itemId=$item.itemId}" title=":{tr}Delete{/tr}">{icon name="delete"} <span>{tr}Delete{/tr}</span></a> + <a class="click-modal tips" href="{service controller=tracker action=remove_item trackerId=$item.trackerId itemId=$item.itemId}" title=":{tr}Delete{/tr}">{icon name="delete"} <span>{tr}Delete{/tr}</span></a> {/if} View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9b04c1e0405698e29979d53e25761e090390c52d -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9b04c1e0405698e29979d53e25761e090390c52d 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