add class for facilitating scripts
[diogenes.git] / templates / header / debug.tpl
1 {if $db_trace or $call_trace or $plugins_trace}
2 {literal}
3 <script type="text/javascript">
4 <!--
5 function show_debug_trace( title, trace )
6 {
7   _diogenes_debug = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
8   _diogenes_debug.document.write("<HTML><HEAD>");
9   _diogenes_debug.document.write("<TITLE>" + title + "</TITLE>");
10   {/literal}_diogenes_debug.document.write("<link rel=\"stylesheet\" href=\"{$debug_css}\" type=\"text/css\" />");{literal}
11   _diogenes_debug.document.write("</HEAD>");
12   _diogenes_debug.document.write("<BODY style=\"padding: 10px;\">");
13   _diogenes_debug.document.write("<h2>" + title + "</h2>");
14   _diogenes_debug.document.write(trace);
15   _diogenes_debug.document.write("</BODY></HTML>");
16   _diogenes_debug.document.close();
17 }
18
19 function show_db_trace()
20 {
21   {/literal}show_debug_trace('{$msg_debug_dbtrace}', '{$db_trace|escape:"javascript"}');{literal}
22 }
23
24 function show_call_trace()
25 {
26   {/literal}show_debug_trace('{$msg_debug_calltrace}', '{$call_trace|escape:"javascript"}');{literal}
27 }
28
29 function show_plugins_trace()
30 {
31   {/literal}show_debug_trace('{$msg_debug_plugins}', '{$plugins_trace|escape:"javascript"}');{literal}
32 }
33
34 // -->
35 </script>        
36 {/literal}
37 <div id="debug">
38 <div class="title">{$msg_debug_bar}</div>
39 {if $db_trace}
40 <div class="item" id="db-trace"><a href="javascript:show_db_trace();">{$msg_debug_dbtrace}</a></div>
41 {/if}
42 {if $call_trace}
43 <div class="item" id="call-trace"><a href="javascript:show_call_trace();">{$msg_debug_calltrace}</a></div>
44 {/if}
45 {if $plugins_trace}
46 <div class="item" id="plugins-trace"><a href="javascript:show_plugins_trace();">{$msg_debug_plugins}</a></div>
47 {/if}
48 </div>
49 {/if}