Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js 4 Dec 2007 02:48:31 -0000 1.1 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js 11 Apr 2009 18:15:09 -0000 1.2 @@ -1,9 +1 @@ -/* - * Ext JS Library 2.0 - * Copyright(c) 2006-2007, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.debug={};(function(){var B;function A(){var E=new Ext.debug.ScriptsPanel();var G=new Ext.debug.LogPanel();var C=new Ext.debug.DomTree();var D=new Ext.TabPanel({activeTab:0,border:false,tabPosition:"bottom",items:[{title:"Debug Console",layout:"border",items:[G,E]},{title:"DOM Inspector",layout:"border",items:[C]}]});B=new Ext.Panel({id:"x-debug-browser",title:"Console",collapsible:true,animCollapse:false,style:"position:absolute;left:0;bottom:0;",height:200,logView:G,layout:"fit",tools:[{id:"close",handler:function(){B.destroy();B=null;Ext.EventManager.removeResizeListener(F)}}],items:D});B.render(document.body);B.resizer=new Ext.Resizable(B.el,{minHeight:50,handles:"n",pinned:true,transparent:true,resizeElement:function(){var H=this.proxy.getBox();this.proxy.hide();B.setHeight(H.height);return H}});function F(){B.setWidth(Ext.getBody().getViewSize().width)}Ext.EventManager.onWindowResize(F);F()}Ext.apply(Ext,{log:function(){if(!B){A()}B.logView.log.apply(B.logView,arguments)},logf:function(F,E,C,D){Ext.log(String.format.apply(String,arguments))},dump:function(F){if(typeof F=="string"||typeof F=="number"||typeof F=="undefined"||F instanceof Date){Ext.log(F)}else{if(!F){Ext.log("null")}else{if(typeof F!="object"){Ext.log("Unknown return type")}else{if(F instanceof Array){Ext.log("["+F.join(",")+"]")}else{var C=["{\n"];for(var D in F){var G=typeof F[D];if(G!="function"&&G!="object"){C.push(String.format(" {0}: {1},\n",D,F[D]))}}var E=C.join("");if(E.length>3){E=E.substr(0,E.length-2)}Ext.log(E+"\n}")}}}}},_timers:{},time:function(C){C=C||"def";Ext._timers[C]=new Date().getTime()},timeEnd:function(D,F){var E=new Date().getTime();D=D||"def";var C=String.format("{0} ms",E-Ext._timers[D]);Ext._timers[D]=new Date().getTime();if(F!==false){Ext.log("Timer "+(D=="def"?C:D+": "+C))}return C}})})();Ext.debug.ScriptsPanel=Ext.extend(Ext.Panel,{id:"x-debug-scripts",region:"east",minWidth:200,split:true,width:350,border:false,layout:"anchor",style:"border-width:0 0 0 1px;",initComponent:function(){this.scriptField=new Ext.form.TextArea({anchor:"100% -26",style:"border-width:0;"});this.trapBox=new Ext.form.Checkbox({id:"console-trap",boxLabel:"Trap Errors",checked:true});this.toolbar=new Ext.Toolbar([{text:"Run",scope:this,handler:this.evalScript},{text:"Clear",scope:this,handler:this.clear},"->",this.trapBox," "," "]);this.items=[this.toolbar,this.scriptField];Ext.debug.ScriptsPanel.superclass.initComponent.call(this)},evalScript:function(){var s=this.scriptField.getValue();if(this.trapBox.getValue()){try{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}catch(e){Ext.log(e.message||e.descript)}}else{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}},clear:function(){this.scriptField.setValue("");this.scriptField.focus()}});Ext.debug.LogPanel=Ext.extend(Ext.Panel,{autoScroll:true,region:"center",border:false,style:"border-width:0 1px 0 0",log:function(){var A=["
",Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments,", ")).replace(/\n/g,"
").replace(/\s/g," "),"
"].join("");this.body.insertHtml("beforeend",A);this.body.scrollTo("top",100000)},clear:function(){this.body.update("");this.body.dom.scrollTop=0}});Ext.debug.DomTree=Ext.extend(Ext.tree.TreePanel,{enableDD:false,lines:false,rootVisible:false,animate:false,hlColor:"ffff9c",autoScroll:true,region:"center",border:false,initComponent:function(){Ext.debug.DomTree.superclass.initComponent.call(this);var H=false,A;var I=/^\s*$/;var E=Ext.util.Format.htmlEncode;var G=Ext.util.Format.ellipsis;var D=/\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;function B(P){if(!P||P.nodeType!=1||P==document.body||P==document){return false}var L=[P],N=P;while((N=N.parentNode)&&N.nodeType==1&&N.tagName.toUpperCase()!="HTML"){L.unshift(N)}var O=A;for(var M=0,J=L.length;M"+G(E(String(M.nodeValue)),35)+"",cls:"x-tree-noicon"}))}}}J()};this.root=this.setRootNode(new Ext.tree.TreeNode("Ext"));A=this.root.appendChild(new Ext.debug.HtmlNode(document.getElementsByTagName("html")[0]))}});Ext.debug.HtmlNode=function(){var D=Ext.util.Format.htmlEncode;var B=Ext.util.Format.ellipsis;var A=/^\s*$/;var C=[{n:"id",v:"id"},{n:"className",v:"class"},{n:"name",v:"name"},{n:"type",v:"type"},{n:"src",v:"src"},{n:"href",v:"href"}];function F(J){for(var H=0,I;I=J.childNodes[H];H++){if(I.nodeType==1){return true}}return false}function E(I,L){var P=I.tagName.toLowerCase();var O="<"+P;for(var J=0,K=C.length;J"+D(N)+"""}}var H=I.style?I.style.cssText:"";if(H){O+=" style=""+D(H.toLowerCase())+"""}if(L&&I.childNodes.length>0){O+=">"+B(D(String(I.innerHTML)),35)+"</"+P+">"}else{if(L){O+=" />"}else{O+=">"}}return O}var G=function(J){var I=!F(J);this.htmlNode=J;this.tagName=J.tagName.toLowerCase();var H={text:E(J,I),leaf:I,cls:"x-tree-noicon"};G.superclass.constructor.call(this,H);this.attributes.htmlNode=J;if(!I){this.on("expand",this.onExpand,this);this.on("collapse",this.onCollapse,this)}};Ext.extend(G,Ext.tree.AsyncTreeNode,{cls:"x-tree-noicon",preventHScroll:true,refresh:function(I){var H=!F(this.htmlNode);this.setText(E(this.htmlNode,H));if(I){Ext.fly(this.ui.textNode).highlight()}},onExpand:function(){if(!this.closeNode&&this.parentNode){this.closeNode=this.parentNode.insertBefore(new Ext.tree.TreeNode({text:"</"+this.tagName+">",cls:"x-tree-noicon"}),this.nextSibling)}else{if(this.closeNode){this.closeNode.ui.show()}}},onCollapse:function(){if(this.closeNode){this.closeNode.ui.hide()}},render:function(H){G.superclass.render.call(this,H)},highlightNode:function(){},highlight:function(){},frame:function(){this.htmlNode.style.border="1px solid #0000ff"},unframe:function(){this.htmlNode.style.border=""}});return G}(); \ No newline at end of file +Ext.debug={};(function(){var b;function a(){var e=new Ext.debug.ScriptsPanel();var g=new Ext.debug.LogPanel();var c=new Ext.debug.DomTree();var d=new Ext.TabPanel({activeTab:0,border:false,tabPosition:"bottom",items:[{title:"Debug Console",layout:"border",items:[g,e]},{title:"DOM Inspector",layout:"border",items:[c]}]});b=new Ext.Panel({id:"x-debug-browser",title:"Console",collapsible:true,animCollapse:false,style:"position:absolute;left:0;bottom:0;",height:200,logView:g,layout:"fit",tools:[{id:"close",handler:function(){b.destroy();b=null;Ext.EventManager.removeResizeListener(f)}}],items:d});b.render(document.body);b.resizer=new Ext.Resizable(b.el,{minHeight:50,handles:"n",pinned:true,transparent:true,resizeElement:function(){var h=this.proxy.getBox();this.proxy.hide();b.setHeight(h.height);return h}});function f(){b.setWidth(Ext.getBody().getViewSize().width)}Ext.EventManager.onWindowResize(f);f()}Ext.apply(Ext,{log:function(){if(!b){a()}b.logView.log.apply(b.logView,arguments)},logf:function(f,e,c,d){Ext.log(String.format.apply(String,arguments))},dump:function(f){if(typeof f=="string"||typeof f=="number"||typeof f=="undefined"||Ext.isDate(f)){Ext.log(f)}else{if(!f){Ext.log("null")}else{if(typeof f!="object"){Ext.log("Unknown return type")}else{if(Ext.isArray(f)){Ext.log("["+f.join(",")+"]")}else{var c=["{\n"];for(var d in f){var g=typeof f[d];if(g!="function"&&g!="object"){c.push(String.format(" {0}: {1},\n",d,f[d]))}}var e=c.join("");if(e.length>3){e=e.substr(0,e.length-2)}Ext.log(e+"\n}")}}}}},_timers:{},time:function(c){c=c||"def";Ext._timers[c]=new Date().getTime()},timeEnd:function(d,f){var e=new Date().getTime();d=d||"def";var c=String.format("{0} ms",e-Ext._timers[d]);Ext._timers[d]=new Date().getTime();if(f!==false){Ext.log("Timer "+(d=="def"?c:d+": "+c))}return c}})})();Ext.debug.ScriptsPanel=Ext.extend(Ext.Panel,{id:"x-debug-scripts",region:"east",minWidth:200,split:true,width:350,border:false,layout:"anchor",style:"border-width:0 0 0 1px;",initComponent:function(){this.scriptField=new Ext.form.TextArea({anchor:"100% -26",style:"border-width:0;"});this.trapBox=new Ext.form.Checkbox({id:"console-trap",boxLabel:"Trap Errors",checked:true});this.toolbar=new Ext.Toolbar([{text:"Run",scope:this,handler:this.evalScript},{text:"Clear",scope:this,handler:this.clear},"->",this.trapBox," "," "]);this.items=[this.toolbar,this.scriptField];Ext.debug.ScriptsPanel.superclass.initComponent.call(this)},evalScript:function(){var s=this.scriptField.getValue();if(this.trapBox.getValue()){try{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}catch(e){Ext.log(e.message||e.descript)}}else{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}},clear:function(){this.scriptField.setValue("");this.scriptField.focus()}});Ext.debug.LogPanel=Ext.extend(Ext.Panel,{autoScroll:true,region:"center",border:false,style:"border-width:0 1px 0 0",log:function(){var a=['
',Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments,", ")).replace(/\n/g,"
").replace(/\s/g," "),"
"].join("");this.body.insertHtml("beforeend",a);this.body.scrollTo("top",100000)},clear:function(){this.body.update("");this.body.dom.scrollTop=0}});Ext.debug.DomTree=Ext.extend(Ext.tree.TreePanel,{enableDD:false,lines:false,rootVisible:false,animate:false,hlColor:"ffff9c",autoScroll:true,region:"center",border:false,initComponent:function(){Ext.debug.DomTree.superclass.initComponent.call(this);var h=false,a;var i=/^\s*$/;var e=Ext.util.Format.htmlEncode;var g=Ext.util.Format.ellipsis;var d=/\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;function b(r){if(!r||r.nodeType!=1||r==document.body||r==document){return false}var l=[r],o=r;while((o=o.parentNode)&&o.nodeType==1&&o.tagName.toUpperCase()!="HTML"){l.unshift(o)}var q=a;for(var m=0,j=l.length;m"+g(e(String(m.nodeValue)),35)+"",cls:"x-tree-noicon"}))}}}j()};this.root=this.setRootNode(new Ext.tree.TreeNode("Ext"));a=this.root.appendChild(new Ext.debug.HtmlNode(document.getElementsByTagName("html")[0]))}});Ext.debug.HtmlNode=function(){var d=Ext.util.Format.htmlEncode;var b=Ext.util.Format.ellipsis;var a=/^\s*$/;var c=[{n:"id",v:"id"},{n:"className",v:"class"},{n:"name",v:"name"},{n:"type",v:"type"},{n:"src",v:"src"},{n:"href",v:"href"}];function f(k){for(var h=0,j;j=k.childNodes[h];h++){if(j.nodeType==1){return true}}return false}function e(j,m){var r=j.tagName.toLowerCase();var q="<"+r;for(var k=0,l=c.length;k"+d(p)+"""}}var h=j.style?j.style.cssText:"";if(h){q+=" style=""+d(h.toLowerCase())+"""}if(m&&j.childNodes.length>0){q+=">"+b(d(String(j.innerHTML)),35)+"</"+r+">"}else{if(m){q+=" />"}else{q+=">"}}return q}var g=function(j){var i=!f(j);this.htmlNode=j;this.tagName=j.tagName.toLowerCase();var h={text:e(j,i),leaf:i,cls:"x-tree-noicon"};g.superclass.constructor.call(this,h);this.attributes.htmlNode=j;if(!i){this.on("expand",this.onExpand,this);this.on("collapse",this.onCollapse,this)}};Ext.extend(g,Ext.tree.AsyncTreeNode,{cls:"x-tree-noicon",preventHScroll:true,refresh:function(i){var h=!f(this.htmlNode);this.setText(e(this.htmlNode,h));if(i){Ext.fly(this.ui.textNode).highlight()}},onExpand:function(){if(!this.closeNode&&this.parentNode){this.closeNode=this.parentNode.insertBefore(new Ext.tree.TreeNode({text:"</"+this.tagName+">",cls:"x-tree-noicon"}),this.nextSibling)}else{if(this.closeNode){this.closeNode.ui.show()}}},onCollapse:function(){if(this.closeNode){this.closeNode.ui.hide()}},render:function(h){g.superclass.render.call(this,h)},highlightNode:function(){},highlight:function(){},frame:function(){this.htmlNode.style.border="1px solid #0000ff"},unframe:function(){this.htmlNode.style.border=""}});return g}(); \ No newline at end of file