我正在使用Kendo拖放来对具有内容的容器进行分组。
但是Kendo draggable应用于.draggie内每个元素的顶部,但是我只想拖放容器(.draggie),而不是其子元素/内容。
有人对这种方法或替代方法有解决方案吗?
我正在使用:
Kendo-UI-v2018.3.1017
jquery-3.2.0
jquery-ui-1.12.1
剑道:
$(document).ready(function() {
$(".draggable").kendoDraggable({
filter: ".draggie",
dragstart: draggableOnDragStart,
dragend: draggableOnDragEnd
});
$(".droptarget").kendoDropTarget({
dragenter: droptargetOnDragEnter,
dragleave: droptargetOnDragLeave,
drop: droptargetOnDrop
});
var draggable = $(".draggable").data("kendoDraggable");
$("#cursorOffset").click(function(e) {
if (this.checked) {
draggable.options.cursorOffset = { top: 10, left: 10 };
} else {
draggable.options.cursorOffset = null;
}
});
});
PHP / HTML:
echo "<div class=\"clear sub-holder\">";
echo "<div class=\"padding-holder draggable\">";
while($rij = mysqli_fetch_array($createsummary->results)){
echo "<div id='d".$rij['freight_id']."' class='draggie cms-menu-block-holder'>";
echo "<div class='cms-menu-block not-drag'>
<span class='overflow-line-none' style=\"display:inline-block;width:5%\">".$rij['freight_id']."</span>
<span class='overflow-line-none' style=\"display:inline-block;width:42%\">".daytodate($rij['freight_date_pick'], 0)." - ".klantmummer_to_name($rij['freight_sender'])."</span> >
<span class='overflow-line-none' style=\"display:inline-block;width:42%\">".daytodate($rij['freight_date_deliver'], 0)." - ".klantmummer_to_name($rij['freight_receiver'])."</span>
</div>";
$design->button_single_inline(array('href' => '?'.$rij['diensten_id'],'icon' => '','name' => '<i class="fa fa-trash" aria-hidden="true"></i>'), 'red icon');
$design->button_single_inline(array('href' => '?module=transports&action=edit&edit='.$rij['diensten_id'],'icon' => '','name' => '<i class="fa fa-pencil" aria-hidden="true"></i>'), 'white icon');
echo "</div>";
}
echo "</div>";
echo "</div>";