Skip to content
Snippets Groups Projects
Commit 11658354 authored by Роман Штейнберг's avatar Роман Штейнберг
Browse files

Merge branch 'issue_143_1' into 'master'

Fix rate student group filter



See merge request !55
parents 7004c6e3 2db44224
Branches
Tags
No related merge requests found
......@@ -160,8 +160,7 @@ class GroupFilter {
constructor(settings, $table, groupID) {
this.settings = settings;
this.$table = $table.children('tbody');
this.filterGroups(+groupID);
this.groupSelected = +groupID;
}
// Скрываем все остальные группы
......@@ -175,12 +174,16 @@ class GroupFilter {
}
listen($selector) {
$selector.children('[value=' + this.groupSelected + ']').prop('selected', true);
this.filterGroups(this.groupSelected);
let self = this;
$selector.change(function () {
let groupSelected = +$(this).val();
if (groupSelected >= 0) {
self.filterGroups(groupSelected);
self.groupSelected = +$(this).val();
if (self.groupSelected >= 0) {
self.filterGroups(self.groupSelected);
let disciplineID = self.settings.disciplineID;
let groupSelected = self.groupSelected;
$.post(URLdir + 'handler/rating/SelectGroup', {disciplineID, groupSelected});
}
});
......
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