diff options
author | Gosha Arinich <me@goshakkk.name> | 2013-01-03 19:21:28 +0300 |
---|---|---|
committer | Gosha Arinich <me@goshakkk.name> | 2013-01-04 00:14:07 +0300 |
commit | 1a5b5e19fc38955d5e755574276fc39fdee438fa (patch) | |
tree | bb74bb5f64372dafb5b785d9c1cea385ccb64d63 /actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb | |
parent | f8633f9fdd542ab81d28210a1ed5399fe244ef17 (diff) | |
download | rails-1a5b5e19fc38955d5e755574276fc39fdee438fa.tar.gz rails-1a5b5e19fc38955d5e755574276fc39fdee438fa.tar.bz2 rails-1a5b5e19fc38955d5e755574276fc39fdee438fa.zip |
move error page js into script tag
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb index ff33430532..1aeff6c1b9 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/layout.erb @@ -114,6 +114,28 @@ a:visited { color: #666; } a:hover { color: #C52F24; } </style> + + <script> + var toggle = function(id) { + var s = document.getElementById(id).style; + s.display = s.display == 'none' ? 'block' : 'none'; + } + var show = function(id) { + document.getElementById(id).style.display = 'block'; + } + var hide = function(id) { + document.getElementById(id).style.display = 'none'; + } + var toggleTrace = function() { + toggle('blame_trace'); + } + var toggleSessionDump = function() { + toggle('session_dump'); + } + var toggleEnvDump = function() { + toggle('env_dump'); + } + </script> </head> <body> |