changeset 5100:496bd1bc9a69 stable

changeset: hack to "reload" page to make #target links work first time Like 9dfd9d242728 did for pull requests.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 07 May 2015 16:23:45 +0200
parents 50cf39fe8335
children cb4e2b2be955
files kallithea/templates/changeset/changeset.html
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/changeset/changeset.html	Thu May 07 16:23:45 2015 +0200
+++ b/kallithea/templates/changeset/changeset.html	Thu May 07 16:23:45 2015 +0200
@@ -283,7 +283,12 @@
                   });
               e.preventDefault();
               }
-          })
+          });
+
+          // hack: re-navigate to target after JS is done ... if a target is set and setting href thus won't reload
+          if (window.location.hash != "") {
+              window.location.href = window.location.href;
+          }
       })
 
     </script>