aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorGosha Arinich <me@goshakkk.name>2013-01-05 19:13:14 +0300
committerGosha Arinich <me@goshakkk.name>2013-01-05 19:15:09 +0300
commit434d9cbd8649ce0d0be53669bf595c00771195e2 (patch)
tree170b4a764446caafc58b67e37e3bd1d969646a05 /railties/lib/rails
parent0aadca2d8392c197cbda45188b461d6d686ca24e (diff)
downloadrails-434d9cbd8649ce0d0be53669bf595c00771195e2.tar.gz
rails-434d9cbd8649ce0d0be53669bf595c00771195e2.tar.bz2
rails-434d9cbd8649ce0d0be53669bf595c00771195e2.zip
allow toggling about env, not just showing
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/templates/rails/welcome/index.html.erb18
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>