| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 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/aix/components/com_kunena/template/aurelia/assets/js/ |
Upload File : |
/**
* Kunena Component
* @package Kunena.Template.Aurelia
*
* @copyright Copyright (C) 2008 - 2025 Kunena Team. All rights reserved.
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
jQuery(document).ready(function ($) {
/* To hide or open spoiler on click */
$(document).on('click', '.kspoiler-expand', function (e) {
e.preventDefault()
const show = $(this.children[0]).val() === Joomla.Text._('COM_KUNENA_LIB_BBCODE_SPOILER_EXPAND');
$(this.children[0]).val(show ? Joomla.Text._('COM_KUNENA_LIB_BBCODE_SPOILER_HIDE') : Joomla.Text._('COM_KUNENA_LIB_BBCODE_SPOILER_EXPAND'));
$(this).parent().children('.kspoiler-wrapper').toggle()
});
/* To allow to close or open the quick-reply modal box */
$('.openmodal').click(function () {
const boxToOpen = $(this).attr('href');
$(boxToOpen).css('visibility', 'visible');
});
/* Button to show more info on profilebox */
$(".heading").click(function () {
if (!$(this).hasClass('heading-less')) {
$(this).prev(".heading").show();
$(this).hide();
$(this).next(".content").slideToggle(500);
}
else {
const content = $(this).next(".heading").show();
$(this).hide();
content.next(".content").slideToggle(500);
}
});
$('[id^="login-link"]').click(function () {
$(this).ready(function () {
if ($('#userdropdown').is(":visible")) {
$(this).addClass('kdelay');
}
else {
$('#userdropdown').css('display', 'inline-block');
$('#userdropdown').css('visibility', 'visible').delay(500).queue(function () {
$(this).addClass('kdelay');
});
}
});
});
$(document).click(function () {
$('.kdelay').css('display', 'none').removeClass('kdelay');
});
$('#userdropdown').click(function (e) {
e.stopPropagation();
});
/* On moderate page display subject or field to enter manually the topic ID */
$('#kmod_topics').change(function () {
const id_item_selected = $(this).val();
if (id_item_selected === 0) {
$('#kmod_subject').hide();
}
else {
$('#kmod_subject').show();
}
if (id_item_selected == -1) {
$('#kmod_targetid').show();
}
else {
$('#kmod_targetid').hide();
}
});
$('#kmod_categories').change(function () {
$.getJSON(
kunena_url_ajax, {catid: $(this).val()}
).done(function (json) {
const first_item = $('#kmod_topics option:nth-child(0)').clone();
const second_item = $('#kmod_topics option:nth-child(1)').clone();
$('#kmod_topics').empty();
first_item.appendTo('#kmod_topics');
second_item.appendTo('#kmod_topics');
$.each(json, function (index, object) {
$.each(object, function (key, element) {
$('#kmod_topics').append('<option value="' + element['id'] + '">' + element['subject'] + '</option>');
});
});
})
.fail(function () {
//TODO: handle the error of ajax request
});
});
});