Skip to content
Snippets Groups Projects
Commit 256e79e4 authored by PavelBegunkov's avatar PavelBegunkov
Browse files

opt

parent 1f523a32
Branches
Tags
No related merge requests found
......@@ -3,27 +3,28 @@ $(function() {
// Изменения базовых параметров дисциплины
$(".AddDiscipline").click(function(){
$('.AddDiscipline').attr("disabled", "disabled");
var BonusRate = $(".BonusRate").prop("checked");
$(this).attr("disabled", true);
var main = $(".main_content");
var BonusRate = main.find(".BonusRate").prop("checked");
$.post(
URLdir + 'handler/map/AddDiscipline',
{
'Grade': $('.SelectGrade').val(),
'SubjectID': $('.SelectSubject').val(),
'Grade': main.find('.SelectGrade').val(),
'SubjectID': main.find('.SelectSubject').val(),
'BonusRate': BonusRate,
'ExamType': $('input:radio[name=ExamType]:checked').val(),
'LectionCount': $('.InputLectionCount').val(),
'PracticeCount': $('.InputPracticeCount').val(),
'FacultyID': $('.SelectFaculty').val()
'ExamType': main.find('input:radio[name=ExamType]:checked').val(),
'LectionCount': main.find('.InputLectionCount').val(),
'PracticeCount': main.find('.InputPracticeCount').val(),
'FacultyID': main.find('.SelectFaculty').val()
},
function(data){
data = $.parseJSON(data);
if(data.success === true) {
$('.AddDiscipline').hide();
$(this).hide();
EventInspector_ShowMsg('Дисциплина добавлена', 'success');
setTimeout('location.replace("'+URLdir+'discipline/structure/'+data.DisciplineID+'")',1000);
} else {
$(".AddDiscipline").removeAttr('disabled');
$(this).removeAttr('disabled');
EventInspector_ShowMsg('Ошибка при добавление дисциплины', 'error');
}
}
......
......@@ -119,9 +119,4 @@ $(function() {
}
// if ($('div').is('.HiddenInputFacultyID'))
// {
// FacultyID = $('.HiddenInputFacultyID').val(); // Факультет, к которой привязана дисциплина
// $('.HiddenInputFacultyID').remove(); // Тут даже Шерлок Холмс бессилен
// }
})
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment