diff --git a/~dev_rating/media/js/rating.js b/~dev_rating/media/js/rating.js index 3f88220c95e75cc35618abc25106612bcfb1d156..50d973b0ccb29bb178518eab4e5b07dc1aea5503 100644 --- a/~dev_rating/media/js/rating.js +++ b/~dev_rating/media/js/rating.js @@ -36,6 +36,8 @@ $(function () { var g_submoduleTitle = ""; var g_submoduleMaxRate = 0; var g_stdName = ""; + + var jCommonCell = $('.commonCell'); var jTdInfo_wrap = $("#tdInfo_wrap"); var jTdInfo = jTdInfo_wrap.children('#tdInfo'); var g_URL = (window.location.href).split("/"); @@ -356,18 +358,18 @@ $(function () { jThis.children("input").removeAttr("disabled"); } - $(".commonCell").mouseenter(function () { + jCommonCell.mouseenter(function () { if (g_isFocusCell === false) TdFocus($(this)); }); - $(".commonCell").mouseleave(function () { + jCommonCell.mouseleave(function () { if (g_isFocusCell === false) TdUnFocus(); }); var oldRate = 0; - $(".commonCell").focusin(function () { + jCommonCell.focusin(function () { g_isFocusCell = true; TdFocus($(this)); TdInfo($(this)); @@ -378,7 +380,7 @@ $(function () { else oldRate = -1; }); - $(".commonCell").focusout(function () { + jCommonCell.focusout(function () { g_isFocusCell = false; Rating($(this), oldRate); @@ -437,7 +439,7 @@ $(function () { return null; } - $(".commonCell").keydown(function (e) { + jCommonCell.keydown(function (e) { var row = g_row; var col = g_col; var direction; @@ -475,12 +477,12 @@ $(function () { }); // При нажатии на элемент commonCell дочерный input получает фокус - $(".commonCell ").click(function () { + jCommonCell.click(function () { $(this).children("input").focus(); }); // В inputCredit (где баллы вводить) разрешаем вводить только цифры - $(".commonCell").children("input").keydown(function (event) { + jCommonCell.children("input").keydown(function (event) { KeyDownOnlyNumber(event); });