');
$.post( "https://www.santmarticentelles.cat/actualitat/agenda/render/esdeveniments",
{
searchWord: $('#brcm-calendar-text-filter').val(),
activeCategories: activeCategories,
firstDay: firstDay,
lastDay: lastDay,
page: page
}).done(function( data ) {
$( "#brcm-events-list" ).html( data );
});
}
function manageFilter()
{
if($('#brcm-calendar-text-filter').val() != '' && $('.brcm-events-delete-filter[element="word-search"]').length == 0)
$('#brcm-filters-list').append(getFilterHtml('Paraula: ', $('#brcm-calendar-text-filter').val(), 'word-search'));
if(activeCategories.length == 0 && !firstDay && $('#brcm-calendar-text-filter').val() == '') $('#brcm-filter-content').hide();
else $('#brcm-filter-content').show();
}
function manageCategories(categoryId)
{
var categoryName = $("#category-"+categoryId).text();
var type = 'Categoria: ';
if(activeCategories.indexOf(categoryId) == -1)
{
$(this).addClass('active-filter');
activeCategories.push(categoryId);
$('#brcm-filters-list').append(getFilterHtml(type, categoryName, 'category-'+categoryId));
} else
{
$(this).removeClass('active-filter');
activeCategories.splice($.inArray(categoryId, activeCategories),1);
$('.brcm-events-delete-filter[element="category-'+categoryId+'"]').parent().remove();
}
}
function manageDays()
{
var type = '';
var intervalText = '';
//Set classes to elements
$('.brcm-selected-day').removeClass('brcm-selected-day');
if(firstDay)
{
$('.brcm-calendar-day[timestamp-value="'+firstDay+'"]').parent().addClass('brcm-selected-day');
if(lastDay)
{
$('.brcm-calendar-day[timestamp-value]').each(function(){
ts = parseInt($(this).attr('timestamp-value'));
if(ts >= firstDay && ts 0) $('.brcm-events-delete-filter[element="day-interval"]').parent().remove();
$('#brcm-filters-list').append(getFilterHtml(type, intervalText, 'day-interval'));
}
}
//Fill filters from session
manageDays();
//Show calendar when loading the page
renderCalendar(1742425631);
renderEvents(1);
});
Filtres de cerca
|
|
|
---|
Selecciona una data fent un sol click, o cerca un intèrval de dates seleccionant la data d’inici (primer click) + la data de fi (segon click).
Llistat d'actes
Resultats per la cerca: eliminar tots els filtres
Comparteix aquesta pàgina: