Author: nbelaevski
Date: 2008-04-29 11:49:31 -0400 (Tue, 29 Apr 2008)
New Revision: 8338
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js
Log:
http://jira.jboss.com/jira/browse/RF-3213
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js 2008-04-29 15:48:38 UTC
(rev 8337)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/log4ajax.js 2008-04-29 15:49:31 UTC
(rev 8338)
@@ -86,13 +86,28 @@
}
}
+LOG.clear = function() {
+ if(LOG._window && LOG._window.document){
+ consoleDiv = LOG._window.document.body;
+ } else {
+ consoleDiv = window.document.getElementById(LOG.consoleDivId);
+ }
+
+ consoleDiv.innerHTML = '<button
onclick="LOG.clear()">Clear</button><br />';
+}
+
LOG.openWindow = function(name,features){
if(LOG._window){
LOG._window.focus();
} else {
LOG._window = window.open("",name,features);
+
+ LOG._window.LOG = LOG;
+ LOG.clear();
+
var _LOG = LOG;
LOG._window.onunload = function(){
+ _LOG._window.LOG = null;
_LOG._window = null;
_LOG.LEVEL = _LOG.OFF;
_LOG=undefined;