{% extends "ndf/base.html" %} {% load pagination_tags %} {% load i18n %} {% load ndf_tags %} {% block title %} {{title}} {% endblock %} {% block style %} .divider-line { font-size: xx-large; color:lightgray; } .line-height-2 { line-height:2; } .line-height-2pt5 { line-height:2.5; } .fontsize-x-large { font-size: x-large; } .margin-0 { margin: 0 !important ;} .resource-drawer { border-color: #D3D3D3; border-style: solid; padding: 0 !important; overflow-y: auto; } .resource-drawer li.bullet-item:hover{ background-color: #ecf0f1; cursor:pointer; } .posted-by{ color: #808080; font-size: small; } .selected-resource { background-color:lightgray !important ; } .resource-type-image { height:40px; background-repeat:no-repeat; background-size: 48px 48px } {% endblock %} {% block script %} function set_drawer_value(group_id) { $('#collection_set_drawer1').html(""); $('#collection_set_drawer2').html(""); $('#collection_set_drawer1').html('
  • '); var _id = '{{batch.pk}}' if (_id != "") { var url = '/{{groupid}}/ajax/get_data_for_user_drawer/?st_batch_id='+st_batch_id+'&'+'_id='+_id; } else { var url = '/{{groupid}}/ajax/get_data_for_user_drawer/?st_batch_id='+st_batch_id; } $.getJSON( url, function( data ) { $.each(data ,function(index , drawer_elements){ if(index == 0) { $.each(drawer_elements.drawer1, function(index, element) { $('#collection_set_drawer1').append("
  • "+element.name+"
  • "); }); } if(index == 1) { $.each(drawer_elements.drawer2, function(index, element) { $('#collection_set_drawer2').append("
  • "+element.name+"
  • "); }); } }); }); } var group_id = '{{group_id}}' var st_batch_id = '{{st_batch_id}}' set_drawer_value(group_id, st_batch_id); $("#save-node").click(function() { cn_arr = [] $.each($('#collection_set_drawer2 li'),function(index,item){ cn_arr.push(item.id); }); $("#collection_set_list").val(cn_arr) }); $('#sel_course').change(function () { var optionSelected = $(this).find("option:selected"); var textSelected = optionSelected.text(); var batch_name = textSelected + "-Batch-" + '{{batch_count}}' if(textSelected == "--select--") { $('#txt_batch_name').val(" ") } else { $('#txt_batch_name').val(batch_name) } }); {% endblock %} {% block body_content %}
    {% csrf_token %}


    {% if batch_count == 1 %} {% else %} {% endif %}
    {% endblock %}