]> granicus.if.org Git - pgbadger/commitdiff
Allow external links use into URL to go to a specific report. Thanks to Hubert depesz...
authorDarold Gilles <gilles@darold.net>
Mon, 4 Nov 2013 21:59:33 +0000 (22:59 +0100)
committerDarold Gilles <gilles@darold.net>
Mon, 4 Nov 2013 21:59:33 +0000 (22:59 +0100)
pgbadger

index 893d86684525327d054932c74f39514c3aba116e..b4760d86ee1b01859df7d68744652e69fcdf9502 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -10202,6 +10202,20 @@ define("google-code-prettify",[],function(){return X})})();return e}();R||P(Q,0)
                jQuery('.slide').hide();
                jQuery('.active-slide').show();
 
+               /* Go to specific slide and report from external link call
+                var activeMenu = location.hash;
+                if (activeMenu) {
+                        activeMenu = activeMenu.substring(1);
+                        var lkobj = document.getElementById(activeMenu);
+                        var liId = jQuery(lkobj).parent().attr("id");
+                        if (liId != undefined) {
+                                var slideId = '#'+liId;
+                                jQuery('#main-container li.slide').removeClass('active-slide').hide();
+                                jQuery(slideId).addClass("active-slide").fadeIn();
+                                window.location.hash = '#'+activeMenu;
+                        }
+                }
+
                jQuery('.navbar li.dropdown').click(function() {
                        var id = jQuery(this).attr("id");
                        id = id.substring(5);