diff options
Diffstat (limited to 'railties/lib/rails/templates')
-rw-r--r-- | railties/lib/rails/templates/rails/welcome/index.html.erb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/railties/lib/rails/templates/rails/welcome/index.html.erb b/railties/lib/rails/templates/rails/welcome/index.html.erb index 8ddec1b2a3..17174e72c0 100644 --- a/railties/lib/rails/templates/rails/welcome/index.html.erb +++ b/railties/lib/rails/templates/rails/welcome/index.html.erb @@ -173,13 +173,17 @@ </style> <script> function about() { - var info = document.getElementById('about-content'), - xhr = new XMLHttpRequest(); - xhr.open("GET", "rails/info/properties", false); - xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - xhr.send(""); - info.innerHTML = xhr.responseText; - info.style.display = 'block' + var info = document.getElementById('about-content'); + + if (info.innerHTML == '') { + var xhr = new XMLHttpRequest(); + xhr.open("GET", "rails/info/properties", false); + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + xhr.send(""); + info.innerHTML = xhr.responseText; + } + + info.style.display = info.style.display == 'none' ? 'block' : 'none'; } </script> </head> |