From b4ee43b4e63c79919b18d7fa5e62b1ccec7e1a0f Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 1 Jul 2014 13:54:55 +0600 Subject: [PATCH] SONAR-5209 Fix transition after permalinks --- sonar-server/src/main/coffee/component-viewer/app.coffee | 1 + sonar-server/src/main/coffee/dashboard/file-app.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/sonar-server/src/main/coffee/component-viewer/app.coffee b/sonar-server/src/main/coffee/component-viewer/app.coffee index 030b538f6d9..f398d217ba9 100644 --- a/sonar-server/src/main/coffee/component-viewer/app.coffee +++ b/sonar-server/src/main/coffee/component-viewer/app.coffee @@ -74,6 +74,7 @@ requirejs [ viewer.open params.component viewer.on 'loaded', -> + viewer.off 'loaded' if params.tab? && params.item? && params.period? viewer.headerView.enableBar(params.tab).done -> viewer.enablePeriod +params.period, params.item diff --git a/sonar-server/src/main/coffee/dashboard/file-app.coffee b/sonar-server/src/main/coffee/dashboard/file-app.coffee index 4ed8aa81d12..8248a285bea 100644 --- a/sonar-server/src/main/coffee/dashboard/file-app.coffee +++ b/sonar-server/src/main/coffee/dashboard/file-app.coffee @@ -53,6 +53,7 @@ requirejs [ activeHeaderItem = metricConf.item viewer.open window.fileKey viewer.on 'loaded', -> + viewer.off 'loaded' if activeHeaderTab? && activeHeaderItem? viewer.state.set activeHeaderTab: activeHeaderTab, activeHeaderItem: activeHeaderItem viewer.headerView.render() -- 2.39.5