1代码合并

This commit is contained in:
2025-02-05 17:57:14 +08:00
parent 4bbce72980
commit 5712066e0a
57 changed files with 334 additions and 3709 deletions
@@ -39,27 +39,6 @@
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtLearningTime" Label="时长(分钟)" Required="true"
ShowRedStar="true" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" ></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownBox runat="server" ID="ddTestTraining" Required="true"
ShowRedStar="true" 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">
@@ -89,45 +68,3 @@
</form>
</body>
</html>
<script type="text/javascript">
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>