cPanel theme

Hired_Goon

New Member
Messages
19
Reaction score
0
Points
0
We're aware of some errors and will try to work them out shortly. If you find any others than the ones posted in this thread please let us know.


Just a little backward compatability issue. I have a bookmark pointing to cpanel at index .htm. It allows me to log in, but it points me to an error for a htm index file after login.

I will update my bookmark, but maybe change the link for the html redirect to php page
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
The cossacks one the top banner is messed up. It's like a tiled logo without the words x10. My friend informed me.
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
russ, you destroyed cpanel's great source code and used tables instead of divs!!! :p (prob a good reason to do it this way :) )
also, the background image for the h6's shifts a pixel everytime the bg image is repeated, and looks ugly


onto trying to fix the rollbox thingy (collapse, expand):
ok, being the person i am to attempt to debug things, looking over the cpanel source i found that the other columns use rollbox(this) in thier ondoubleclick (h6) and onclick (arrow img)

ctrl+f "js" gave me the file that the rollbox() function is in, but i don't think it's got anything to do with why rollbox() doesn't work on custom boxes (i've tried and i see what you mean by the bug ;))

with all that said, and looking through the source below (the js file is one line so i've taken the liberty to indent what i thought was important), i cannot determine how they got `origBoxBodyHeights`'s value, but i didn't spend much time w/ it :D

Code:
function rollbox(e)
{
  if(rollable!=1)
  {
    return
  }
  
  var b=e.id;  // example: pref-header
  var a=(b.split("-"))[0];  // pref
  var d=a+"-body"; // pref-body
  var c=document.getElementById(d);

  if(c.style.display=="none")
  {
    expandbox(a)  //expandbox('pref')
  }else{
    collaspebox(a)
  }
}



function expandbox(h,c)
{
  var e=document.getElementById(h);
  var d=h+"-body";
  var m=h+"-header";
  var k=document.getElementById(d);
  var f=document.getElementById(m);
  var j=document.getElementById(h+"-expander");
  if(!j)
  {
    return
  }

  j.className="box-collapse-control";
  k.style.display="";
  var a=0;
  if(quirksmode=="Safari"||quirksmode=="Opera")
  {
    a=1
  }

  if(!a&&!c)
  {
    var g=new YAHOO.util.Anim(d,{height:{to:origBoxBodyHeights[h]}},0.3);
    var b=function(){
      f.style.marginBottom="10px";
      var n=new YAHOO.util.Anim(d,{opacity:{to:1}},0.4);
      n.animate();
      setboxstatus()
    };
    g.onComplete.subscribe(b);
    g.animate()
  }
  else
  {
    k.style.height=origBoxBodyHeights[h]+"px";
    f.style.marginBottom="10px";
    var l=new YAHOO.util.Anim(d,{opacity:{to:1}},0);
    l.animate();
    if(!c)
    {
      setboxstatus()
    }
  }
}



var rollable=0;
var sections=new Array();
var containerObj;
var regionCache=new Object();
var boxstatus=new Object();
var highlighted_drag_areas=new Object();
var tboxstatus=NVData.xmainrollstatus.split("|");
var origBoxBodyHeights=new Object;
YAHOO.util.DDM.mode=YAHOO.util.DDM.INTERSECT;
register_interfacecfg_nvdata("xmainrollstatus");
register_interfacecfg_nvdata("xmaingroupsorder");

Array.prototype.grep=function(c)
{
  if(!c.apply)
  {
    var d=c;
    c=function(e)
    {
      return e[d]
    }
  }
  var a=[];
  for(var b=0;b<this.length;b++)
  {
    if(c(this[b],this,b))
      {
        a.push(this[b])
      }
    }
    return a
  };
  for(var i=0;i<tboxstatus.length;i++)
  {
    var nv=tboxstatus[i].split("=");
    boxstatus[nv[0]]=nv[1]
  }
  function init_boxes()
  {
    var b="boxes";
    register_container(b);
    if(!containerObj)
    {
      return
    }
    var c=containerObj.childNodes;
    for(var a=0;a<c.length;a++)
    {
      if(c[a].className=="itembox")
      {
        register_section(c[a])
      }
    }
    rollable=1
  }
  function tempexpandboxes()
  {
    for(var a=0;a<sections.length;a++)
    {
    var b=sections[a];
    var d=b+"-body";
    var c=document.getElementById(d);
    if(!c)
    {
      continue
    }
    expandbox(b,1)
  }
}

if anyone can or wants to try to find out how they get `origBoxBodyHeights` in the code above, or in the js files attached in cpanel (x3main_optimized.js), then try your luck w/ debugging ;)


note: they may not want this anyway, so i prob wasted a good bit of time on this xD
 
Last edited:
Top