zm
2020-09-22 8c63d5d46bd96e50f17e280de005eec28acfe204
知识点
1 files modified
67 ■■■■ changed files
we254/addons/fy_teacher/template/mobile/index/edit.html 67 ●●●● patch | view | raw | blame | history
we254/addons/fy_teacher/template/mobile/index/edit.html
@@ -115,32 +115,34 @@
                    <div id="lead" class="card">    
                        <div class="topnav">
                            <input type="text" class="input" id="names" name="names" value="" readonly>
                            <a id="selectpos" href="javascript:void(0);" class="button bg-blue"><span>+选择知识点</span></a>
                            <a id="selectpos" href="javascript:void(0);" class="button bg-blue"><span>选择知识点</span></a>
                            <a id="addKonw" href="javascript:void(0);" class="button bg-blue"><span>+新增知识点</span></a>
                        </div>
                        <input type="hidden" value="" id="selectposhidden" />
                    </div>
         <div id="m1" class="xmenu" style="display: none;">
            <div class="select-info">
                <label class="top-label">已选知识点:</label>
                <ul>
                </ul>
                <a  name="menu-confirm" href="javascript:void(0);" class="a-btn">
                    <span class="a-btn-text">确定</span>
                </a>
            </div>
            <dl id="know_dl">
                {loop $knowList $item}
                    <dt id="{$item['id']}" class="open">{$item['name']}</dt>
                    <dd style="padding-bottom: 0px;padding-top:0px;">
                        <ul>
                            {loop $item['child'] $citem}
                            <li rel="{$citem['id']}" >{$citem['name']}</li>
                            {/loop}
                        </ul>
                    </dd>
                {/loop}
            </dl>
        </div>
                    <div id="m1" class="xmenu" style="display: none;">
                        <div class="select-info">
                            <label class="top-label">已选知识点:</label>
                            <ul>
                            </ul>
                            <a  name="menu-confirm" href="javascript:void(0);" class="a-btn">
                                <span class="a-btn-text">确定</span>
                            </a>
                        </div>
                        <dl id="know_dl">
                            {loop $knowList $item}
                                <dt id="{$item['id']}" class="open">{$item['name']}</dt>
                                <dd style="padding-bottom: 0px;padding-top:0px;">
                                    <ul>
                                        {loop $item['child'] $citem}
                                        <li rel="{$citem['id']}" >{$citem['name']}</li>
                                        {/loop}
                                    </ul>
                                </dd>
                            {/loop}
                        </dl>
                    </div>
                    <div id="knowdiv" style="padding-top:3px"></div>
                </div>
            </div>
            <div class="form-group" id="add_know_div" style="display: none;">
@@ -577,15 +579,10 @@
}
//添加专题&知识点
function addKnowParent() {
    if($("#add_know").length>0){
        $("#add_know").empty();
    }
    if($("#add_know_parent").length>0){
        $("#add_know_parent").show();
    }else{
$("#addKonw").click(function addKnowParent() {
        var spec_html = '';        
        $("#knowdiv").empty();
        //$("#knowdiv").empty();
        spec_html += '<div id="add_know_parent" class="input-group w60">';
        spec_html += '    <span class="input-group-addon">专题名称</span>';
        spec_html += '    <input type="text" class="input" id="know_parent_name" name="know_parent_name">';
@@ -594,9 +591,7 @@
        spec_html += '</div>';
        $("#knowdiv").append(spec_html);
    }
    $("#know_child").hide();
}
});
//添加知识点
function addKnow() {
@@ -692,7 +687,7 @@
    }else{
        for(var i in know){
            chtml += '<dt id="' + know[i].id + '" class="open">' + know[i].name + '</dt>';
            chtml += '<dt id="' + know[i].id + '" class="open" >' + know[i].name + '&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="alert(123);">aaa</a></dt>';
            chtml += '<dd style="padding-bottom: 0px;padding-top:0px;">';
            chtml += '    <ul>';
            var child = know[i].child;
@@ -700,7 +695,7 @@
                chtml += '<li id="li_' + child[j].id+'" rel="' + child[j].id+'">' + child[j].name + '</li>';
                if($.inArray(child[j].id,know_ids_arr)>=0){
                    selected_ids_arr[selected_ids_arr.length] = child[j].id;
                    selected_names_arr[selected_ids_arr.length] = child[j].name;
                    selected_names_arr[selected_ids_arr.length-1] = child[j].name;
                }
            }
            chtml += '    </ul>';