Browse Source
Merge pull request #13536 from abpframework/Prevent-multiple-reactions-13313
Prevented multiple reactions
pull/13610/head
Enis Necipoglu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
0 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/ReactionSelection/default.js
|
|
|
@ -22,8 +22,20 @@ $(document).ready(function () { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
function isDoubleClicked(element) { |
|
|
|
if (element.data("isclicked")) return true; |
|
|
|
|
|
|
|
element.data("isclicked", true); |
|
|
|
setTimeout(function () { |
|
|
|
element.removeData("isclicked"); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
|
|
|
|
function registerClickOfReactionIcons($container) { |
|
|
|
$container.find('.cms-reaction-icon').each(function () { |
|
|
|
|
|
|
|
if (isDoubleClicked($(this))) return; |
|
|
|
|
|
|
|
var $icon = $(this); |
|
|
|
var reactionName = $icon.attr('data-reaction-name'); |
|
|
|
if ($icon.attr('data-click-action') === 'false') { |
|
|
|
|