Skip to content
Snippets Groups Projects
Commit 9ff6cd59 authored by PavelBegunkov's avatar PavelBegunkov
Browse files

Merge branch 'develop' of http://itlab.mmcs.sfedu.ru/git/grade-rating into develop

parents bbacf187 0d8a602a
Branches
Tags
No related merge requests found
...@@ -24,7 +24,9 @@ $(function() ...@@ -24,7 +24,9 @@ $(function()
}); });
$.post(URLdir + 'handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){ $.post(URLdir + 'handler/admTeachers/getDepartmentsList', {'facultyID': $('#facultySelect option:selected').val()}, function(data){
$.each(data, function(i){ $.each(data, function(i){
$("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); var dep = data[i];
if (!dep.Name) dep.Name = 'Служебная кафедра';
$("#departmentSelect").append('<option value="'+dep.ID+'">'+dep.Name+'</option>');
}); });
$("#departmentSelect").removeAttr("disabled"); $("#departmentSelect").removeAttr("disabled");
}, "json"); }, "json");
......
...@@ -80,7 +80,9 @@ $(function() { ...@@ -80,7 +80,9 @@ $(function() {
jDepartmentSelect.html("<option value='0'>Выберите кафедру (не обязательно)</option>"); jDepartmentSelect.html("<option value='0'>Выберите кафедру (не обязательно)</option>");
for (i in Dep) { for (i in Dep) {
jDepartmentSelect.append("<option value='"+ Dep[i].ID +"'>"+ Dep[i].Name +"</option>"); var dep = Dep[i];
if (!dep.Name) dep.Name = 'Служебная кафедра';
jDepartmentSelect.append("<option value='"+ dep.ID +"'>"+ dep.Name +"</option>");
} }
if (i <= 0) if (i <= 0)
jDepartmentSelect.html("<option value='0'>Нет кафедр</option>"); jDepartmentSelect.html("<option value='0'>Нет кафедр</option>");
......
...@@ -10,8 +10,10 @@ $(function() ...@@ -10,8 +10,10 @@ $(function()
$.post( URLdir + 'handler/settings/getDepartmentsList', $.post( URLdir + 'handler/settings/getDepartmentsList',
{'facultyID': $('#facultySelect option:selected').val()}, {'facultyID': $('#facultySelect option:selected').val()},
function(data){ function(data){
$.each(data, function(i){ $.each(data, function(i) {
$("#departmentSelect").append('<option value="'+data[i].ID+'">'+data[i].Name+'</option>'); var dep = data[i];
if (!dep.Name) dep.Name = 'Служебная кафедра';
$("#departmentSelect").append('<option value="' + dep.ID + '">' + dep.Name + '</option>');
}); });
$("#departmentSelect").removeAttr("disabled"); $("#departmentSelect").removeAttr("disabled");
}, },
......
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