[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] maps: Popups and indexing

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a96d9e3a128d_3818e78c58549@gitlab-sidekiq-low-urgency-cpu-bound-v2-58d48c47b5-pq8h5.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
35f79a71 by Jonny Bradley at 2026-09-01T13:41:57+00:00
[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

- - - - -


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
=====================================
@@ -1098,7 +1098,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
=====================================
@@ -16,8 +16,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/35f79a71b89f1bc9de34c59c477241e107705e1e

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