Only allowing a Sortable to be dragged from and not dragged to
I have 2 sortable columns. The first is a column with current issues and the second is a column with new issues. I only want to be able to drag from the second column to the first, but not from the first to the second.
I dynamically build the portlets in my code behind. Everything is working I just would like to "enhance" my application to not allow drag and drop from column 1 to column 2. I would like to be able to still drag and drop the first column, sort, etc..
Here is my JQuery:
$(function () { $(".column").sortable({ connectWith: ".column", handle: ".portlet-header", cancel: ".portlet-toggle", placeholder: "portlet-placeholder ui-corner-all", update: updatePortletPositions }).disableSelection(); $(".portlet") .addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all") .find(".portlet-header") .addClass("ui-widget-header ui-corner-all") .prepend("<span class='ui-icon ui-icon-minusthick portlet-toggle'></span>"); $(".portlet-toggle").click(function () { var icon = $(this); icon.toggleClass("ui-icon-minusthick ui-icon-plusthick"); icon.closest(".portlet").find(".portlet-content").toggle(); }); });