$(function(){
  $("#assets li.asset").draggable({
    handle: ".handle",
    helper: "clone",
    connectToSortable: "#tray ol",
    start:function(e, ui) {
      $('#tray ol').addClass("active");
    },
    stop:function(e, ui) {
      $('#tray ol').removeClass("active");
    }
  });

  $("#catalog_main").droppable({
    accept:'.asset',
    activeClass:'active',
    hoverClass:'hover',
    drop:function(ev,ui){
      var id;
      var asset = $(ui.draggable).clone();
      if ($(ui.draggable).is("[id^='tp']")) {
        id = $(ui.draggable).attr("rel");
        asset.find("input").remove();
        asset.attr("id", "asset_" + id);
      } else {
        id = $(ui.draggable).attr("asset_id");
      }
      $.ajax({
        type: 'put',
        url: window.location.href + "/add_asset",
        data: "&asset_id="+id,
      });
      window.location.reload();
    }
  });
});

@@ -831,18 +831,41 @@
     
-%7D);%0A
+  success: function()%7B%0A 
       
+   
 wind
@@ -882,24 +882,44 @@
 n.reload();%0A
+        %7D%0A      %7D);%0A
     %7D%0A  %7D);%0A

Fix drag&drop into catalog