| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/brest/components/com_community/assets/source/js/dialog/ |
Upload File : |
(function( root, $, factory ) {
joms.dialog || (joms.dialog = {});
joms.dialog.reacted = factory( root, $);
define([ 'dialog/reacted' ], function() {
return joms.dialog.reacted;
});
})( window, joms.jQuery, function( window, $ ) {
var modal;
function render( _modal, element, uid, reactId ) {
modal = _modal;
reactId = reactId ? reactId : 0;
joms.ajax({
func: 'system,ajaxShowReactedUsers',
data: [element, uid, reactId],
callback: function( json ) {
setTimeout( function() {
modal.setContent( json.html );
var $content = $(modal.getContent());
var $react = $content.find('li.joms-reacted__item');
$react.on('click', getUsersByReaction);
}, 5000);
}
})
}
function getUsersByReaction(e) {
var $elm = $(e.currentTarget);
var element = $elm.attr('data-element');
var reactId = $elm.attr('data-reactid');
var uid = $elm.attr('data-uid');
var $modalContent = $(modal.getContent());
var $loading = $modalContent.find('.joms-js--loading');
var $content = $modalContent.find('.joms-reacted__content');
var $items = $modalContent.find('li.joms-reacted__item');
if (!$elm.hasClass('active')) {
$items.removeClass('active');
$elm.addClass('active');
$content.hide();
$loading.show();
joms.ajax({
func: 'system,ajaxGetUsersByReaction',
data: [element, uid, reactId],
callback: function( json ) {
$content.html(json.html);
$content.show();
$loading.hide();
}
})
}
}
return function( element, uid, reactId ) {
joms.util.dialog.prepare( function( modal ) {
render( modal, element, uid, reactId );
})
}
});