Coder Profile - Show off your skills, get a coder profile.
 
 
 
  
Posted: 2.17 Years Ago 

VBAssassin
United Kingdom
Contrib Level: 17
Total Posts: 5,718
Hi ya guys,

I have this code that i am working on adding to the Account Home Page on this site.

The code will allow you to reorganize the applications on your account home page. It works, but if you move all the boxes out of a column. There is no way of getting any of the boxes from the other columns, back in to the blank column. Nothing drags back in to it!

How the heck do you solve that "easily". I can think of tedious ways, but would rather not do that. Maybe a quick way would be to use one of the callback events and revert the drag if that item is the only one left in the column?

It uses scriptaculous by the way.
CODE: Copy / Restore  ::  Remove Scroll Bars
  1. <table width='100%' style='border:solid 1px #AAAAAA;background-color:#CCCCCC;' cellspacing='0' cellpadding='0'>
  2.        <tr>
  3.               <td width='33%' valign='top' style='padding-left:10px;padding-right:10px;'>
  4.                      <div id='names1' style='position:relative;margin-top:10px;'>
  5.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fsdssssssfd</div>
  6.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fdsaas</div>
  7.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fds</div>
  8.                      </div>
  9.               </td>
  10.               <td width='34%' valign='top'>
  11.                      <div id='names2' style='position:relative;margin-top:10px;'>
  12.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fsdssssssfd</div>
  13.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fdsaas</div>
  14.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fds</div>
  15.                      </div>
  16.               </td>
  17.               <td width='33%' valign='top' style='padding-left:10px;padding-right:10px;'>
  18.                      <div id='names3' style='position:relative;margin-top:10px;'>
  19.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fsdssssssfd</div>
  20.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fdsaas</div>
  21.                             <div style='width:100%;height:50px;background-color:#FFFFFF;border:solid 1px #AAAAAA;color:#EEEEEE;margin-bottom:10px;'>fds</div>
  22.                      </div>
  23.               </td>
  24.        </tr>
  25. </table>
  26. <script>
  27.        document.observe('dom:loaded', function () {
  28.               Sortable.create('names1', { tag: 'div', constraint: false, containment: ['names1', 'names2', 'names3'] });
  29.               Sortable.create('names2', { tag: 'div', constraint: false, containment: ['names1', 'names2', 'names3'] });
  30.               Sortable.create('names3', { tag: 'div', constraint: false, containment: ['names1', 'names2', 'names3'] });
  31.        });
  32. </script>
Kind regards,
Scott
Page 1 of 1
 
 
Latest News About Coder Profile
Coder Profile Poll
Which sounds better on your coder profiles, and makes more sense to you (think twitter, facebook, etc)?

Followers / Following
Fans / Following
Fans / Fan Of


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
1.77 Year Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2010, Scott Thompson, All Rights Reserved