]> source.dussan.org Git - sonarqube.git/commitdiff
Fix select2 components on IE8
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Jun 2013 10:06:08 +0000 (12:06 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 20 Jun 2013 10:06:08 +0000 (12:06 +0200)
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb

index 9d7bd8d49917ae1b3bbc5df90e344ef9768bb53d..b1957e6bb68e06307b42e02a181b4655f3796adb 100644 (file)
@@ -618,7 +618,7 @@ module ApplicationHelper
       js += "$j('##{html_id}').select2('open');"
     end
 
-    "#{html}<script>#{js}</script>"
+    "#{html}<script>$j(document).ready(function(){#{js}});</script>"
   end
 
 
@@ -774,7 +774,7 @@ module ApplicationHelper
                       :disabled => options[:disabled],
                       :id => html_id)
     js = "$j('##{html_id}').select2({#{js_options.map { |k, v| "#{k}:#{v}" }.join(',')}});"
-    "#{html}<script>#{js}</script>"
+    "#{html}<script>$j(document).ready(function() {#{js}});</script>"
   end
 
   #
@@ -810,7 +810,7 @@ module ApplicationHelper
     if options[:open]
       js += "$j('##{html_id}').select2('open');"
     end
-    "#{html}<script>#{js}</script>"
+    "#{html}<script>$j(document).ready(function() {#{js}});</script>"
   end
 
   #