X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=ux%2Fieconsole.js;h=7b391cb2fb17ac551b4101d83b34762af12d399a;hp=8b781985df05dcd2d6ba74adc6fbf2049edbe10d;hb=0b69a11b1055a6d3a3fd0719bdd58b5a235de0e4;hpb=4de2da4f5723c8a1133ea0ec8a92d205f875aded diff --git a/ux/ieconsole.js b/ux/ieconsole.js index 8b781985df..7b391cb2fb 100644 --- a/ux/ieconsole.js +++ b/ux/ieconsole.js @@ -16,33 +16,34 @@ if(!window.console){ if(!document.getElementById(id)){ console.d.id=id; } + var st = console.d.style; + st.position = 'absolute'; + st.top = 0; + st.right = 0; + st.width='300px'; + st.border = '1px solid #999'; + st.fontFamily = 'courier,monospace'; + st.background = '#eee'; + st.fontSize = '10px'; + st.padding = '10px'; + st.zIndex = 100000; + st.overflow = "auto"; + + console.hide(); - var st = document.createElement('style'); - document.body.appendChild(st); - - st.appendChild(document.createTextNode('' + - '#fauxconsole{' + - ' position:absolute;' + - ' top:0;'+ - ' right:0;'+ - ' width:300px;'+ - ' border:1px solid #999;'+ - ' font-family:courier,monospace;'+ - ' background:#eee;'+ - ' font-size:10px;'+ - ' padding:10px;'+ - '}'+ - 'html>body #fauxconsole{'+ - ' position:fixed;'+ - '}'+ + + + var CSS = "\n" + '#fauxconsole a{'+ ' float:right;'+ ' padding-left:1em;'+ ' padding-bottom:.5em;'+ ' text-align:right;'+ - '}' - )); - + '}'; + var htmDiv = document.createElement('div'); + htmDiv.innerHTML = '

 

'; + document.body.appendChild(htmDiv); + }, @@ -53,6 +54,9 @@ if(!window.console){ console.d.style.display='block'; }, log:function(o){ + if (!console.d) { + console.init(); + } console.d.innerHTML+='
'+o; console.show(); },