fix:移成达培训
This commit is contained in:
@@ -39,6 +39,25 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtLearningTime" Label="时长(分钟)" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" ></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="ddTestTraining" Label="考试题库" EnableMultiSelect="true" CustomData="true">
|
||||
<PopPanel>
|
||||
<f:Tree ID="treeTestTraining" ShowHeader="false" Hidden="true" runat="server" EnableCheckBox="true" CascadeCheck="true">
|
||||
|
||||
</f:Tree>
|
||||
</PopPanel>
|
||||
<Listeners>
|
||||
<f:Listener Event="poppanelshow" Handler="onPopPanelShow" />
|
||||
</Listeners>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
@@ -67,4 +86,46 @@
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
<script>
|
||||
var ddTestTraining = '<%= ddTestTraining.ClientID %>';
|
||||
var treeTestTraining = '<%= treeTestTraining.ClientID %>';
|
||||
|
||||
function onPopPanelShow(event) {
|
||||
var nodes = this.getValue();
|
||||
|
||||
F.noEvent(function () {
|
||||
// 第二个参数true:是否递归调用子节点
|
||||
F(treeTestTraining).checkNodes(nodes, true);
|
||||
|
||||
// 启用树控件的级联选择时,确保把树控件的选中值全部同步到下拉框
|
||||
syncToDropDownBox();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 将树控件的选中值同步到下拉框
|
||||
function syncToDropDownBox() {
|
||||
var values = [], texts = [];
|
||||
var checkedNodes = F(treeTestTraining).getCheckedNodes(true);
|
||||
$.each(checkedNodes, function (index, node) {
|
||||
debugger;
|
||||
values.push(node.id);
|
||||
texts.push(node.text);
|
||||
});
|
||||
|
||||
F(ddTestTraining).setValue(values, texts);
|
||||
}
|
||||
|
||||
F.ready(function () {
|
||||
|
||||
F(treeTestTraining).on('nodecheck', function (event, nodeId, checked) {
|
||||
// 加个延迟,等待复选框的级联选择完成
|
||||
window.setTimeout(function () {
|
||||
syncToDropDownBox();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user