From 9c6259b7bd67aee4f6ce8dbfdda7bfb86a856610 Mon Sep 17 00:00:00 2001 From: bwdutton Date: Wed, 11 Sep 2019 14:27:49 -0700 Subject: [PATCH] fix broken admin comment nav links https://github.com/bwdutton/gallery3/issues/2 --- .../comment/views/admin_manage_comments.html.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/comment/views/admin_manage_comments.html.php b/modules/comment/views/admin_manage_comments.html.php index e3c8546c..25e767d2 100644 --- a/modules/comment/views/admin_manage_comments.html.php +++ b/modules/comment/views/admin_manage_comments.html.php @@ -39,6 +39,21 @@ show: fix_links, }); }); + + $('body').on('click', '.g-button', function() { + var a = $(this); + if (a.find('span.ui-icon-seek-next, span.ui-icon-seek-end, span.ui-icon-seek-prev, span.ui-icon-seek-first').length > 0) { + event.stopPropagation(); + $.scrollTo(0, 800, { easing: "swing" }); + a.parents(".ui-tabs-panel").load( + a.attr("href"), + function() { + fix_links(); + }); + + return false; + } + });