Skip to content
Snippets Groups Projects
Commit 2db44224 authored by Владислав Яковлев's avatar Владислав Яковлев
Browse files

Fix rate studgent group filter

parent 7004c6e3
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