diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-10-07 16:17:10 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-10-07 16:17:10 +0200 |
commit | 64995e8b621b9b56f74dcbb97c353a8db98c6ef4 (patch) | |
tree | f0864dbfd070dd145e3cea52d0b3f4e6c62c6f2c | |
parent | e2ff41df1dabb78bcb2c191758e3bc91af3e087e (diff) | |
download | sonarqube-64995e8b621b9b56f74dcbb97c353a8db98c6ef4.tar.gz sonarqube-64995e8b621b9b56f74dcbb97c353a8db98c6ef4.zip |
SONAR-5664 Component Viewer doesn't work properly in the differential mode in Safari
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/main.coffee | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/component-viewer/main.coffee index 9f65306e531..15e2a13d138 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/main.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/main.coffee @@ -185,9 +185,9 @@ define [ # Periods @periods.reset [{label: t('none')}] data.periods.forEach (p) => - d = new Date p[2] - d.setHours 0, 0, 0, 0 - p = @periods.add key: p[0], label: p[1], sinceDate: d + d = moment p[2] + date = new Date d.get('year'), d.get('month'), d.get('date') + p = @periods.add key: p[0], label: p[1], sinceDate: date requestMeasures: (key, period = null) -> diff --git a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee index 477420b5d29..5c3d522595a 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee @@ -84,7 +84,8 @@ define [ if period p = predicate predicate = (issue) => - (new Date(issue.creationDate) >= period.get('sinceDate')) && p issue + creationDate = new Date moment(issue.creationDate).format() + (creationDate >= period.get('sinceDate')) && p issue if requestIssues && !@state.get 'hasIssues' @requestIssues(@key).done => @_filterByIssues(predicate) |