135 lines
6.9 KiB
HTML
135 lines
6.9 KiB
HTML
|
{function razdel_59_tr fo=''}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="#" class="btn btn-secondary btn-sm table_59_del_tr" data-fo="{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Удаление строки из таблицы, не забывайте сохранять!"><i class="bi bi-trash"></i></a>
|
||
|
</td>
|
||
|
<td><input type="text" class="form-control form-control-sm table_59_td_{$fo} inputModal inputModalClearHelp getModules" data-fo="{$fo}" data-name="modul" value="{if isset($data.modul)}{$data.modul}{/if}"></td>
|
||
|
<td><input type="text" class="form-control form-control-sm table_59_td_{$fo} inputModal" data-fo="{$fo}" data-name="data" value="{if isset($data.data)}{$data.data}{/if}"></td>
|
||
|
<td><input type="text" class="form-control form-control-sm table_59_td_{$fo} inputModal" data-fo="{$fo}" data-name="namemer" value="{if isset($data.namemer)}{$data.namemer|escape}{/if}"></td>
|
||
|
<td><input type="text" class="form-control form-control-sm table_59_td_{$fo} inputModal" data-fo="{$fo}" data-name="formaprov" value="{if isset($data.formaprov)}{$data.formaprov|escape}{/if}"></td>
|
||
|
<td><input type="text" class="form-control form-control-sm table_59_td_{$fo} inputModal" data-fo="{$fo}" data-name="otvetst" value="{if isset($data.otvetst)}{$data.otvetst|escape}{/if}"></td>
|
||
|
<td style="position: relative;"><input type="text" class="form-control form-control-sm table_59_td_{$fo} formkomp59" data-fo="{$fo}" data-name="dostig" value="{if isset($data.dostig)}{$data.dostig|escape}{/if}"></td>
|
||
|
</tr>
|
||
|
{/function}
|
||
|
{literal}
|
||
|
<style>
|
||
|
.formkomp59_div{
|
||
|
position: absolute;
|
||
|
right: 0px;
|
||
|
top: 40px;
|
||
|
width: 400px;
|
||
|
height: 200px;
|
||
|
overflow: auto;
|
||
|
background: #fff;
|
||
|
padding: 6px;
|
||
|
border: 1px solid gray;
|
||
|
z-index: 100;
|
||
|
}
|
||
|
.formkomp59_div_close{
|
||
|
position: absolute;
|
||
|
right:2px;
|
||
|
top:2px;
|
||
|
}
|
||
|
</style>
|
||
|
<script>$(document).ready(function(){
|
||
|
//Удаление строк из таблицы
|
||
|
$(document).on("click", ".table_59_del_tr", function(){
|
||
|
let fo = $(this).data('fo');
|
||
|
$(this).closest( "tr" ).remove();
|
||
|
$(".tooltip").hide();
|
||
|
return false;
|
||
|
});
|
||
|
//Добавление строки в таблицу
|
||
|
$(document).on("click", ".btn_add_table_59_tr", function(){
|
||
|
let fo = $(this).data('fo');
|
||
|
let tr = $('#table_59_orig_'+fo).val(); //получили оригинал
|
||
|
$('#table_59_'+fo).append(tr); //добавили
|
||
|
return false;
|
||
|
});
|
||
|
//Выбор компетенций для поля
|
||
|
var formkomp59El=null;
|
||
|
$(document).on("click", ".formkomp59", function(){
|
||
|
if($(".formkomp59_div").length){}else {
|
||
|
formkomp59El = $(this);
|
||
|
let val = formkomp59El.val();
|
||
|
let index = "";
|
||
|
let comp = "";
|
||
|
let body = "";
|
||
|
let check = '';
|
||
|
$(".comp3_items").each(function () {
|
||
|
index = $(this).data("index");
|
||
|
comp = $(this).data("comp");
|
||
|
if (val.indexOf(index)>=0) check=' CHECKED'; else check='';
|
||
|
body += "<input type='CHECKBOX' class='form-checkbox formkomp59_checkbox' "+check+" data-index='" + index + "' data-comp='" + comp + "'> <b>" + index + "</b> " + comp + "<br>";
|
||
|
});
|
||
|
$(this).after("<div class='formkomp59_div'><div class='formkomp59_div_close'><a href='#' class='btn btn-sm btn-danger formkomp59_div_close_btn'><i class='bi bi-x-circle'></i></a></div>" + body + "</div>");
|
||
|
}
|
||
|
});
|
||
|
$(document).on("click", ".formkomp59_checkbox", function(){
|
||
|
let index = $(this).data("index");
|
||
|
let val = formkomp59El.val();
|
||
|
if ($(this).is(':checked')){
|
||
|
val += index+"; ";
|
||
|
}else{
|
||
|
val = val.replace(index+"; ","");
|
||
|
}
|
||
|
formkomp59El.val(val);
|
||
|
});
|
||
|
$(document).on("click", ".formkomp59_div_close_btn", function(){
|
||
|
$(this).closest(".formkomp59_div").remove();
|
||
|
return false;
|
||
|
});
|
||
|
$(document).on("click", ".getModules", function() {
|
||
|
$("#modal_variants").html($("#lists_moduls").html());
|
||
|
});
|
||
|
$(document).on("click", ".moduls_item", function() {
|
||
|
let modul = $(this).html();
|
||
|
$("#inputval").val(modul);
|
||
|
return false;
|
||
|
});
|
||
|
})</script>{/literal}
|
||
|
{function razdel_59}
|
||
|
<div>
|
||
|
{assign var=fo value='1'}
|
||
|
<div id="lists_moduls" style="display: none;">{foreach from=$MODULS item=modul}<a href="#" class="moduls_item">Модуль {$modul.name} {$modul.descrip}</a><br> {/foreach}</div>
|
||
|
<textarea id="table_59_orig_{$fo}" style="display: none;">{razdel_59_tr fo=$fo}</textarea>
|
||
|
<table class="table table-bordered table-sm">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="text-center" style="width: 20px;">
|
||
|
<a href="#" class="btn btn-sm btn-warning btn_add_table_59_tr" data-fo="{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Добавление строки"><i class="bi bi-plus-square"></i></a>
|
||
|
</th>
|
||
|
<th class="text-center">Модуль</th>
|
||
|
<th class="text-center">Дата, место проведения</th>
|
||
|
<th class="text-center">Название мероприятия</th>
|
||
|
<th class="text-center">Форма проведения мероприятия</th>
|
||
|
<th class="text-center">Ответственный</th>
|
||
|
<th class="text-center">Достижения обучающихся</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody id="table_59_{$fo}">
|
||
|
{if isset($save)&&count($save)&&count($save.razdel5_9)&&isset($save.razdel5_9[$fo])}
|
||
|
{foreach from=$save.razdel5_9[$fo] item=ss}
|
||
|
{razdel_59_tr fo=$fo data=$ss}
|
||
|
{/foreach}
|
||
|
{/if}
|
||
|
{razdel_59_tr fo=$fo}
|
||
|
</tbody>
|
||
|
<tfoot>
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="#" class="btn btn-sm btn-danger table_59_td_{$fo}_btnsave btnsave_table" data-tds="table_59_td_{$fo}" data-form="table_59_{$fo}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="сохранение таблицы"><i class="bi bi-save"></i></a>
|
||
|
</td>
|
||
|
<td colspan="6"></td>
|
||
|
</tr>
|
||
|
</tfoot>
|
||
|
</table>
|
||
|
</div>
|
||
|
{/function}
|
||
|
|
||
|
<div class="col-md-12">
|
||
|
<h4>5.9. Календарный график воспитательной работы по дисциплине {if $save.razdel5_9[0][0].sem=='null'}<a href="#" class="btn btn-danger razdelNot_btn" data-state="0" data-razdel="razdel5_9" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Учебным планом не предусмотрено"><i class="bi bi-x-square"></i></a>{else}<a href="#" class="btn btn-secondary razdelNot_btn" data-state="1" data-razdel="razdel5_9" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Учебным планом не предусмотрено"><i class="bi bi-x-square"></i></a>{/if}</h4>
|
||
|
{razdel_59}
|
||
|
</div>
|
||
|
|