Browse Source

[FrameworkBundle] made the exception stack trace integratable in the web profiler

hhamon 14 years ago
parent
commit
f0e1df2688

+ 33 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/exception.html.twig

@@ -81,4 +81,36 @@
         </div>
         </div>
     {% endif %}
     {% endif %}
 
 
-</div>
+</div>
+
+<script type="text/javascript">
+    //<![CDATA[
+    function toggle(id, clazz) {
+        el = document.getElementById(id);
+        current = el.style.display
+
+        if (clazz) {
+            var tags = document.getElementsByTagName('*');
+            for (i = 0; i < tags.length; i++) {
+                if (tags[i].className == clazz) {
+                    tags[i].style.display = 'none';
+                }
+            }
+        }
+
+        el.style.display = current == 'none' ? 'block' : 'none';
+    }
+
+    function switchIcons(id1, id2) {
+        icon1 = document.getElementById(id1);
+        icon2 = document.getElementById(id2);
+
+        visibility1 = icon1.style.visibility;
+        visibility2 = icon2.style.visibility;
+
+        icon1.style.visibility = visibility2;
+        icon2.style.visibility = visibility1;
+    }
+
+    //]]>
+</script>

+ 0 - 32
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/layout.html.twig

@@ -6,38 +6,6 @@
 
 
         <link href="{{ asset('/bundles/framework/css/exception_layout.css') }}" rel="stylesheet" type="text/css" media="all" />
         <link href="{{ asset('/bundles/framework/css/exception_layout.css') }}" rel="stylesheet" type="text/css" media="all" />
         <link href="{{ asset('/bundles/framework/css/exception.css') }}" rel="stylesheet" type="text/css" media="all" />
         <link href="{{ asset('/bundles/framework/css/exception.css') }}" rel="stylesheet" type="text/css" media="all" />
-
-        <script type="text/javascript">
-            //<![CDATA[
-            function toggle(id, clazz) {
-                el = document.getElementById(id);
-                current = el.style.display
-
-                if (clazz) {
-                    var tags = document.getElementsByTagName('*');
-                    for (i = 0; i < tags.length; i++) {
-                        if (tags[i].className == clazz) {
-                            tags[i].style.display = 'none';
-                        }
-                    }
-                }
-
-                el.style.display = current == 'none' ? 'block' : 'none';
-            }
-
-            function switchIcons(id1, id2) {
-                icon1 = document.getElementById(id1);
-                icon2 = document.getElementById(id2);
-
-                visibility1 = icon1.style.visibility;
-                visibility2 = icon2.style.visibility;
-
-                icon1.style.visibility = visibility2;
-                icon2.style.visibility = visibility1;
-            }
-
-            //]]>
-        </script>
     </head>
     </head>
     <body>
     <body>
         <div id="content">
         <div id="content">