【发布时间】:2018-10-07 05:18:52
【问题描述】:
我想尝试创建多个列表框,它可以正常拖放并拖放回主列表框。
但是当我尝试从第二个框选择到主框时,转移到按钮未激活
像这样的整个过程,当我点击转移到按钮时,我应该询问转移到哪里应该弹出带有 3 个单选按钮的弹出窗口。
提前谢谢你
$("#optional").kendoListBox({
dropSources: ["selected","selected2","selected3"],
connectWith: ["selected","selected2","selected3"],
draggable: { placeholder: customPlaceholder,customPlaceholder2,customPlaceholder3 },
toolbar: {
tools: ["transferTo", "transferFrom", "transferAllTo", "transferAllFrom"]
},
});
$("#selected").kendoListBox({
draggable: { placeholder: customPlaceholder },
dropSources: ["optional"],
connectWith: "optional"
});
$("#selected2").kendoListBox({
draggable: { placeholder: customPlaceholder2 },
dropSources: ["optional"],
connectWith: "optional"
});
$("#selected3").kendoListBox({
draggable: { placeholder: customPlaceholder3 },
dropSources: ["optional"],
connectWith: "optional"
});
function customPlaceholder(draggedItem) {
return draggedItem
.clone()
.addClass("custom-placeholder")
.removeClass("k-ghost");
}
function customPlaceholder2(draggedItem) {
return draggedItem
.clone()
.addClass("custom-placeholder")
.removeClass("k-ghost");
}
function customPlaceholder3(draggedItem) {
return draggedItem
.clone()
.addClass("custom-placeholder")
.removeClass("k-ghost");
}
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<link href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.common-material.min.css" rel="stylesheet" />
<link href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.rtl.min.css" rel="stylesheet" />
<link href="https://kendo.cdn.telerik.com/2018.1.221/styles/kendo.material.min.css" rel="stylesheet" />
<script src="https://kendo.cdn.telerik.com/2018.1.221/js/kendo.all.min.js"></script>
<div class="demo-section k-content js-height-grey">
<select id="optional" >
<option>Steven White</option>
<option>Nancy King</option>
<option>Nancy Davolio</option>
<option>Robert Davolio</option>
<option>Michael Leverling</option>
<option>Andrew Callahan</option>
<option>Michael Suyama</option>
</select>
<select id="selected"></select>
<select id="selected2"></select>
<select id="selected3"></select>
</div>
【问题讨论】:
标签: jquery user-interface jquery-ui kendo-ui