diff --git a/~dev_rating/media/js/discipline/general.js b/~dev_rating/media/js/discipline/general.js index e9879c5678049e1570a1fc7f3bf005a8fb7383e6..00d6382d71737418d0bd7970d6b3fc9a34e1381c 100644 --- a/~dev_rating/media/js/discipline/general.js +++ b/~dev_rating/media/js/discipline/general.js @@ -70,12 +70,11 @@ $(function() { var SelectSubject = $('.SelectSubject'); SelectSubject.html(''); if (SortSubjects.Count > 0) { - SelectSubject.append('<option disabled>Результаты:</option>'); + var appendData = '<option disabled>Результаты:</option>'; for (var i = SortSubjects.Count - 1; i >= 0; --i) - SelectSubject.append('<option value="'+ SortSubjects[i].ID +'">'+ SortSubjects[i].Title +'</option>'); - + appendData += '<option value="'+ SortSubjects[i].ID +'">'+ SortSubjects[i].Title +'</option>'; var size = (SortSubjects.Count > 4)?'4':'2'; - SelectSubject.attr('size', size); + SelectSubject.append($.parseHTML(appendData)).attr('size', size); } else SelectSubject.append('<option disabled>По запросу ничего не найдено.</option>').attr('size', '2');