Index: trunk/core/kernel/utility/debugger/debugger.js =================================================================== diff -u -r7391 -r7635 --- trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 7391) +++ trunk/core/kernel/utility/debugger/debugger.js (.../debugger.js) (revision 7635) @@ -57,7 +57,11 @@ } // Debugger -function Debugger() { +function Debugger($row_separator, $errors_count, $fatal_error, $sql_count) { + this.RowSeparator = $row_separator; + this.IsFatalError = $fatal_error; + this.ErrorsCount = parseInt($errors_count); + this.SQLCount = parseInt($sql_count); this.IsQueried = false; this.IsVisible = false; this.DebuggerDIV = document.getElementById('debug_layer'); @@ -75,17 +79,42 @@ Debugger.prototype.SetOpacity = function(opacity) { this.DebuggerToolbar.style.opacity = (opacity / 100); - this.DebuggerToolbar.style.MozOpacity = (opacity / 100); - this.DebuggerToolbar.style.KhtmlOpacity = (opacity / 100); - this.DebuggerToolbar.style.filter = "alpha(opacity=" + opacity + ")"; + this.DebuggerToolbar.style.MozOpacity = (opacity / 100); + this.DebuggerToolbar.style.KhtmlOpacity = (opacity / 100); + this.DebuggerToolbar.style.filter = "alpha(opacity=" + opacity + ")"; } +Debugger.prototype.ToolbarClick = function ($button) { + switch ($button.id) { + case 'dbg_ReloadFrame': + self.location.reload(); + break; + + case 'dbg_ShowDebugger': + this.Toggle(); + break; + } +} + Debugger.prototype.AddToolbar = function($var_name) { var $span = document.createElement('SPAN'); $span.style.position = 'absolute'; - $span.innerHTML = '

'; - + var $toolbar_content = 'Reload Frame'; + + if (this.ErrorsCount > 0) { + $toolbar_content += 'Show Debugger (' + this.ErrorsCount + ' errors)'; + } + else { + $toolbar_content += 'Show Debugger'; + } + + if (this.SQLCount > 0) { + $toolbar_content += '' + this.SQLCount + ' sqls'; + } + + $span.innerHTML = '' + $toolbar_content + '
'; + this.DebuggerToolbar = $span; this.SetOpacity(20); $span.onmouseover = function() {