Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
7.2 KiB

  1. /*
  2. * Ext JS Library 2.2
  3. * Copyright(c) 2006-2008, Ext JS, LLC.
  4. * licensing@extjs.com
  5. *
  6. * http://extjs.com/license
  7. */
  8. 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=["<div style=\"padding:5px !important;border-bottom:1px solid #ccc;\">",Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments,", ")).replace(/\n/g,"<br />").replace(/\s/g,"&#160;"),"</div>"].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<J;M++){O.expand();O=O.findChild("htmlNode",L[M]);if(!O){return false}}O.select();var K=O.ui.anchor;treeEl.dom.scrollTop=Math.max(0,K.offsetTop-10);O.highlight();return true}function F(K){var J=K.tagName;if(K.id){J+="#"+K.id}else{if(K.classNa