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