"
if ( a_i.agenda_item.image != null ) image = a_i.agenda_item.image
if ( a_i.agenda_item.thumbnail_image != null ) image = a_i.agenda_item.thumbnail_image
if ( a_i.agenda_item.medium_image != null ) image = a_i.agenda_item.medium_image
if (image != null) displ += "

"
displ += "
"
displ += "
"+a_i.agenda_item.title+"
"
displ += a_i.agenda_item.stage + ",
"+a_i.agenda_item.city+""
displ += "
" + a_i.agenda_item.description + "
"
displ += "
"
if (a_i.agenda_item.doors_time != null) displ += "deuren open
" + a_i.agenda_item.doors_time + ""
if (a_i.agenda_item.start_time != null) displ += "begint om:
" + a_i.agenda_item.start_time + ""
if (a_i.agenda_item.end_time != null) displ += "eindigd om:
" + a_i.agenda_item.end_time + ""
if (a_i.agenda_item.entry != null) displ += "adviesprijs:
€ "+ Math.round( ( parseInt(a_i.agenda_item.entry)/2 ) * 100) / 100 + "0"
//displ += "
Meer informatie en Tickets"
displ += "
"
displ += "
met: "+ a_i.agenda_item.tag_list + "
"
displ += "
"
displ += ""
$('.agenda_items').append( displ )
}) // end for each
}
}
function findValueCallback(event, data, formatted) {
post_controller()
}
//function updateAllRelated( "agenda_id", "" );
$(function() {
// ajax in the cities
$.ajax({
url: "/stedenlijst",
context: document.body,
success: function( data ){
var steden = data.split("\n");
$('#stad').autocomplete( steden )
$('#stad').result().keypress( function(e) { if (e.keyCode == 13) { post_controller() }})
}
});
// autcomplete
$('#stad').keypress( function(e) { if (e.keyCode == 13) { post_controller() }})
//$('#stad').result( findValueCallback ).next().click( function() { $(this).prev().search(); } ); // add callback ( find findValueCallbackTag in helpers )
// ajax in the artists
$.ajax({
url: "/artist_names",
// "/names_feed"
context: document.body,
success: function( data ){
var artists = data.split("\n");
$('#artiest').autocomplete( artists )
$('#artiest').result().keypress( function(e) { if (e.keyCode == 13) { post_controller() }})
}
});
// autocomplete 1
$('#artiest').keypress( function(e) { if (e.keyCode == 13) { post_controller() }})
//$('#artiest').result( findValueCallback ).next().click( function() { $(this).prev().search(); } ); // add callback ( find findValueCallbackTag in helpers )
// set dates
var now_date = new Date()
$( "#from_date" ).val( now_date.getDate() + "." + (parseInt(now_date.getMonth()) + 1) + "." + now_date.getFullYear() )
var nextMonth = parseInt(now_date.getMonth()) + 2
if (nextMonth == 13) nextMonth = 1
$( "#to_date" ).val( now_date.getDate() + "." + nextMonth + "." + now_date.getFullYear() )
// datepicker translations
translations = { // Default regional settings
closeText: 'Klaar', // Display text for close link
prevText: 'Vrg', // Display text for previous month link
nextText: 'Vlgd', // Display text for next month link
currentText: 'Vandaag', // Display text for current month link
monthNames: ['januari','februari','maart','april','mei','juni', 'july','augustus','september','oktober','november','december'], // Names of months for drop-down and formatting
monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], // For formatting
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], // For formatting
dayNamesShort: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], // For formatting
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], // Column headings for days starting at Sunday
weekHeader: 'Wk', // Column header for week of the year
dateFormat: 'dd.mm.yy', // See format options on parseDate
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
isRTL: false, // True if right-to-left language, false if left-to-right
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
yearSuffix: '' // Additional text to append to the year in the month headers
};
// set datepicker
console.log('where are my translations')
$( "#from_date" ).datepicker( translations );
$( "#to_date" ).datepicker( translations );
// set onchange
// $( "#to_date" ).change( function() { } )
// $( "#from_date" ).change( function() { } )
})