ReimuHakurei / phpPgAdmin

Actively maintained fork of phpPgAdmin.
GNU General Public License v2.0
102 stars 24 forks source link

Ajax browsing of foreign keys only works in one level (fixed) #23

Closed themadsens closed 10 months ago

themadsens commented 10 months ago

Clicking a foreign key in the ajax popover follows the href instead of transitively showing the row target on a new popover:

The fix is simple though: Fix the port from '$().live()' to '$().on()' in commit bf0572a7d4d31d53cc26cd75e94daf3fbd0d5510 like this:

diff --git a/js/display.js b/js/display.js
index ad27de31..6dfb7db2 100644
--- a/js/display.js
+++ b/js/display.js
@@ -9,7 +9,7 @@ $(function() {
        root: $('#root')
    };

-   $("a.fk").on('click', function (event) {
+   $(document).on('click', "a.fk", null, function (event) {
        /* make the cursor being a waiting cursor */
        $('body').css('cursor','wait');

Let me know if you need a PR for this ..