From 7ed97534ce631060b6da792b0a5f70e61b1cebe1 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 19 Jan 2016 17:10:21 +0100 Subject: [PATCH] extract some js from ruby template --- server/sonar-web/src/main/js/libs/sonar.js | 9 +++++++++ .../main/webapp/WEB-INF/app/views/layouts/_head.html.erb | 8 +------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/server/sonar-web/src/main/js/libs/sonar.js b/server/sonar-web/src/main/js/libs/sonar.js index c6a6ba10fc4..38e4b71e017 100644 --- a/server/sonar-web/src/main/js/libs/sonar.js +++ b/server/sonar-web/src/main/js/libs/sonar.js @@ -26,3 +26,12 @@ require('script!./select2-jquery-ui-fix.js'); require('script!./inputs.js'); require('script!./jquery-isolated-scroll.js'); require('script!./application.js'); + +window.$j = jQuery.noConflict(); + +jQuery(function () { + jQuery('.open-modal').modal(); +}); + +window.sonarqube = {}; +window.sonarqube.el = '#content'; diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb index c82b0012620..66c5645c688 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb @@ -39,13 +39,7 @@ - <%= yield :script -%> -- 2.39.5