From 1bb389c76d0ddae0c5ab1c14171a0e93cd2526cf Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 23 May 2014 11:22:10 +0200 Subject: SONAR-5334 First frontend integration --- sonar-server/src/main/coffee/coding-rules/app.coffee | 6 ++++-- sonar-server/src/main/coffee/quality-gate/app.coffee | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sonar-server/src/main/coffee') diff --git a/sonar-server/src/main/coffee/coding-rules/app.coffee b/sonar-server/src/main/coffee/coding-rules/app.coffee index 230bdd4e489..fa4996a81b7 100644 --- a/sonar-server/src/main/coffee/coding-rules/app.coffee +++ b/sonar-server/src/main/coffee/coding-rules/app.coffee @@ -350,7 +350,10 @@ requirejs [ appXHR = jQuery.ajax url: "#{baseUrl}/api/rules/app" - jQuery.when(appXHR) + # Message bundles + l10nXHR = window.requestMessages() + + jQuery.when(appXHR, l10nXHR) .done (r) -> App.appState = new Backbone.Model App.state = new Backbone.Model @@ -360,7 +363,6 @@ requirejs [ App.repositories = r.repositories App.statuses = r.statuses App.characteristics = r.characteristics - window.messages = r.messages App.facetPropertyToLabels = 'languages': App.languages diff --git a/sonar-server/src/main/coffee/quality-gate/app.coffee b/sonar-server/src/main/coffee/quality-gate/app.coffee index 1e2e4b52c83..2f6a8720f27 100644 --- a/sonar-server/src/main/coffee/quality-gate/app.coffee +++ b/sonar-server/src/main/coffee/quality-gate/app.coffee @@ -130,11 +130,13 @@ requirejs [ App.canEdit = r.edit App.periods = r.periods App.metrics = r.metrics - window.messages = r.messages qualityGatesXHR = App.qualityGates.fetch() - jQuery.when(qualityGatesXHR, appXHR) + # Message bundles + l10nXHR = window.requestMessages() + + jQuery.when(qualityGatesXHR, appXHR, l10nXHR) .done -> # Remove the initial spinner jQuery('#quality-gate-page-loader').remove() -- cgit v1.2.3