/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
/* This file is part of version 0.96beta2 released Fri, 20 Mar 2009 11:01:14 +0100 */
(function(){Xinha.plugins.AboutBox=a;function a(b){this.editor=b}a._pluginInfo={name:"AboutBox",developer:"The Xinha Core Developer Team"};a.prototype._lc=function(b){return Xinha._lc(b,"AboutBox")};a.prototype._prepareDialog=function(){var b=this;var d=this.editor;Xinha.loadStyle("about.css","AboutBox","aboutCSS");this.dialog=new Xinha.Dialog(d,a.html,"Xinha",{width:600});this.dialog.getElementById("close").onclick=function(){b.dialog.hide()};this.dialog.getElementById("xinha_logo").src=_editor_url+"images/xinha_logo.gif";var c=this.dialog.getElementsByClassName("tab");this.currentTab=c[0];c.forEach(function(e){e.onclick=function(){if(b.currentTab){Xinha._removeClass(b.currentTab,"tab-current");b.dialog.getElementById(b.currentTab.rel).style.display="none"}Xinha._addClass(e,"tab-current");e.blur();b.currentTab=e;b.dialog.getElementById(e.rel).style.display="block"}});this.fillPlugins();this.fillVersion();this.dialog.onresize=function(){this.getElementById("content").style.height=parseInt(this.height,10)-this.getElementById("h1").offsetHeight-this.getElementById("buttons").offsetHeight-100+"px"}};a.prototype.fillPlugins=function(){var k=this.editor;var d=this.dialog.getElementById("plugins_table");var g,l,b;var c=0;for(var f in k.plugins){var h=k.plugins[f];g=document.createElement("tr");if(c%2){g.style.backgroundColor="#e5e5e5"}d.appendChild(g);l=document.createElement("td");l.innerHTML=h.name;if(h.version){l.innerHTML+=" v"+h.version}g.appendChild(l);l=document.createElement("td");if(h.developer){if(h.developer_url){l.innerHTML='<a target="_blank" href="'+h.developer_url+'">'+h.developer+"</a>"}else{l.innerHTML=h.developer}}g.appendChild(l);l=document.createElement("td");if(h.sponsor){if(h.sponsor_url){l.innerHTML='<a target="_blank" href="'+h.sponsor_url+'">'+h.sponsor+"</a>"}else{l.innerHTML=h.sponsor}}g.appendChild(l);l=document.createElement("td");if(h.license){l.innerHTML=h.license}else{l.innerHTML="htmlArea"}g.appendChild(l);c++}};a.prototype.fillVersion=function(){var b=Xinha.version;this.dialog.getElementById("version").innerHTML="<pre>\nRelease:         "+b.Release+" ("+b.Date+")\nHead:            "+b.Head+"\nRevision:        "+b.Revision+"\nLast Changed By: "+b.RevisionBy+"\n</pre>"};a.prototype.show=function(){var c=this;if(!a.html){if(a.loading){return}a.loading=true;Xinha._getback(Xinha.getPluginDir("AboutBox")+"/dialog.html",function(d){a.html=d;c.show()});return}if(!this.dialog){this._prepareDialog()}var b={inputArea:""};this.dialog.show(b)}})();