Skip to content
Snippets Groups Projects
Commit 6f66c382 authored by Антон Шалимов's avatar Антон Шалимов
Browse files

fix double change rate in rating

parent afed867b
Branches
Tags
No related merge requests found
......@@ -290,7 +290,7 @@
cursor: pointer;
font-size: 14px;
}
/* Прикрипление групп */
.ChangeStudyGroupDIV{
margin: 10px 0 5px 0;
......
......@@ -4,7 +4,7 @@ $(function() {
var isFocusCell = false; // Стоит фокус или нет
var oldRateCell;
// Ставим фокус
// Ставим подстветку
function tdFocus(thisObj, thisClass){
tdClass = thisClass.split(' ');
oldRateCell = thisObj.children('input').val();
......@@ -16,7 +16,7 @@ $(function() {
});
}
// Убираем фокус
// Убираем подстветку
function tdUnFocus(thisObj){
oldRateCell = undefined;
$('.'+tdClass[0]).each(function(){
......@@ -29,6 +29,7 @@ $(function() {
function Rating(thisObj, OldRate) {
// Здесь thisObj - div rateCell, а не input, который является дочкой
thisObj.children('input').attr("disabled", true);
// Получаем подмодуль
var reg = /col_\d+/;
var col = ''+reg.exec(thisObj.attr('class'));
......@@ -60,6 +61,7 @@ $(function() {
EventInspector_ShowMsg('Балл добавлен/изменен', 'success');
}
else EventInspector_ShowMsg('Не удалось добавить/изменить балл', 'error');
thisObj.children('input').removeAttr('disabled');
}
);
}
......@@ -69,6 +71,7 @@ $(function() {
else
thisObj.children('input').val('0');
EventInspector_ShowMsg('Текущий балл превышает максимальный для данного модуля', 'error');
thisObj.children('input').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