Problem using drag and drop

Problem using drag and drop

Hello,

I`m having a problem with my drag and drop code.

Accountnaam: admin
Wachtwoord: Admin

(The website language is dutch)

If you start draging the blocks to a new position it will lose the option bar above.

Jquery code i`m using
  1.   $(function() {
  2.   
  3.     $(".column").sortable({
  4.     
  5.     scrollSensitivity: 5,
  6.     cursor: 'move', 
  7.     connectWith: '.column',
  8.         
  9.     start: function(event, ui){  
  10.     
  11.           // Get value      
  12.           var text = $.trim(ui.item.text());
  13.           var html = ui.item.html();         
  14.           var optionshtml = $(".options").html();
  15.           var width = $.trim(ui.item.width());
  16.           var height = $.trim(ui.item.height()) / 4;
  17.           var atrvalue = $('.options').attr('linked');
  18.           ui.item.startHtml = ui.item.html(); 
  19.           ui.item.html('<div style="width: '+ width +'px; border: 1px dashed #FF4D00; padding: 15px; background-color: #B8E24F; opacity: 0.7;"><div class="options">'+ optionshtml +'</div>'+ html +'</div>');
  20.           $('.column').addClass('selected');

  21.     },
  22.     
  23.     stop: function(event, ui){ 
  24.           ui.item.html(ui.item.startHtml);
  25.           $('.column').removeClass('selected'); 
  26.     },   
  27.          
  28.     update: function(e, ui) {
  29.             if (this === ui.item.parent()[0]) {
  30.                 var strokeid = ui.item.closest('.column').attr('id');
  31.          var order = $(this).sortable("serialize") + '&update=update&s=' + strokeid; 
  32.          $.post("/controller/blocks/updateBlocks.php", order, function(theResponse){
  33.                        $('.column').removeClass('selected');
  34.          });
  35.             }  
  36. }
  37.       
  38.     });
  39.   }); 
  40.   
  41.   // Debug Drag drop on active CKEditor
  42.   function PreventDragDropEvent() {
  43.         $(".column").sortable('disable');
  44.   }
  45.   function StartDragDropEvent() {
  46.         $(".column").sortable('enable');
  47.   } 
  My page.tpl code

  1.         <!-- START BLOCK : StrokeList -->
  2.         <div class="column" id="stroke_{id}" style="width: {width}%;">
  3.           <!-- START BLOCK : Blocks -->   
  4.           <div class="options" style="width: {width}%;" linked="arrayorder_{id}"><img src="/controller/images/delete.png"> <img src="/controller/images/settings.png"></div>
  5.           <div class="portlet" id="arrayorder_{id}" style="width: {width}%;" contenteditable="true" onblur="StartDragDropEvent();" onfocus="PreventDragDropEvent();">
  6.               {content}
  7.           </div>       
  8.           <!-- END BLOCK : Blocks -->
  9.         </div>
  10.         <!-- END BLOCK : StrokeList -->

Please try out the draging part of the website to see the problem in action.

Any help would be great.

Danny

(Sorry for my bad English)