diff options
-rw-r--r-- | sonar-server/src/main/coffee/component-viewer/app.coffee | 1 | ||||
-rw-r--r-- | sonar-server/src/main/coffee/dashboard/file-app.coffee | 1 |
2 files changed, 2 insertions, 0 deletions
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() |