want help in cpanel 11 javascript - could anyone assist

flexiweb

Registered
Apr 1, 2008
1
0
51
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:)
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
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:)
It's built on the Yahoo User Interface Javascript library. Try searching for that, or YUI.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
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.
 

Attachments