]> source.dussan.org Git - sonarqube.git/commitdiff
extract some js from ruby template
authorStas Vilchik <vilchiks@gmail.com>
Tue, 19 Jan 2016 16:10:21 +0000 (17:10 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 20 Jan 2016 08:23:12 +0000 (09:23 +0100)
server/sonar-web/src/main/js/libs/sonar.js
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb

index c6a6ba10fc4664429987db72812fe57476c57845..38e4b71e01731106afb17ca919fcff4c1f9a5625 100644 (file)
@@ -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';
index c82b0012620c516de02136230a8c3e24a1695937..66c5645c688a3a0fd01aed685048bc09264e7de2 100644 (file)
   <script src="<%= ApplicationController.root_context -%>/js/bundles/vendor.js?v=<%= sonar_version -%>"></script>
   <script src="<%= ApplicationController.root_context -%>/js/bundles/sonar.js?v=<%= sonar_version -%>"></script>
   <script>
-    var baseUrl = '<%= ApplicationController.root_context -%>';
-    var $j = jQuery.noConflict();
-    $j(document).ready(function () {$j('.open-modal').modal()});
-  </script>
-  <script>
-    window.sonarqube = {};
-    window.sonarqube.el = '#content';
+    window.baseUrl = '<%= ApplicationController.root_context -%>';
   </script>
   <%= yield :script -%>
 </head>