The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

want help in cpanel 11 javascript - could anyone assist

Discussion in 'General Discussion' started by flexiweb, Apr 1, 2008.

  1. flexiweb

    flexiweb Registered

    Joined:
    Apr 1, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hello to all,

    ive been looking all over the net fot hours on end after a drag and drop / rearrange box type javascript like the one featured in cpanel 11 / x. ive tried copying it straight from the page itself but its no use.

    if anyone knows the script or has it or even knows where i can get a similer script it would be very appreciated.

    thankyou.

    flexiweb:)
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It's built on the Yahoo User Interface Javascript library. Try searching for that, or YUI.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Well this is a two-pronged issue.

    Actually doing the drag and drop is fairly easy. It's just a matter of calling some YUI code and having the correct CSS. Here's a code sample I'm using at my presentation at this year's cPanel Conference on this topic (attached screenshot)

    The problem comes with storing the order. As you can see, there is no API2 code in the code sample so the APIs have no way of knowing this box exists. Additionally, since this is outside the API2 code block that inserts the feature boxes in proper order, this box will always be at the top (or the bottom, depending on your code placement) when the page is loaded/refreshed. There may be a way around this issue, however I have not dedicated time to this yet.
     

    Attached Files:

Loading...

Share This Page