Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/iblock.vote/templates/flat/ |
Upload File : |
(function (window) { if (!!window.JCFlatVote) { return; } window.JCFlatVote = { trace_vote: function (div, flag) { var my_div; //Left from current my_div = div; while (my_div = my_div.previousSibling) { if (flag) BX.addClass(my_div, 'bx-star-active'); else BX.removeClass(my_div, 'bx-star-active'); } //current if (flag) BX.addClass(div, 'bx-star-active'); else BX.removeClass(div, 'bx-star-active'); //Right from the current my_div = div; while (my_div = my_div.nextSibling) { BX.removeClass(my_div, 'bx-star-active'); } }, do_vote: function (div, parent_id, arParams) { var r = div.id.match(/^vote_(\d+)_(\d+)$/); var vote_id = r[1]; var vote_value = r[2]; arParams['vote'] = 'Y'; arParams['vote_id'] = vote_id; arParams['rating'] = vote_value; BX.ajax.post( '/bitrix/components/bitrix/iblock.vote/component.php', arParams, function (data) { var obContainer = BX(parent_id); if (obContainer) { var obResult = BX.create('DIV'); obResult.innerHTML = data; obContainer.parentNode.replaceChild(obResult.firstChild, obContainer); } } ); } } } )(window);