Quarterly Results
' +
'
' +
'{{#years}}' +
'
{{year}}
' +
'{{/years}}' +
'
' +
'
' +
'
' +
'{{#categories}}' +
'
' +
'
{{{catTitle}}}
' +
'
' +
'{{#catYears}}'+
'
' +
'{{/catYears}}'+
'
' +
'
' +
'{{/categories}}' +
'
'
),
beforeRender: function(e, data) {
var schema = {
/*"Annual Report": ['AR'],
"Supplementary Report": ['SR'],
"Earnings Webcast": ['Q1', 'Q2', 'Q3', 'Q4'],
"Form 10Q": ['Q1', 'Q2', 'Q3', 'Q4'],
"Earnings Transcript": ['Q1', 'Q2', 'Q3', 'Q4']*/
"Earnings release": ['Q1', 'Q2', 'Q3', 'Q4'],
"MD&A": ['Q1', 'Q2', 'Q3', 'Q4'],
"Financials": ['Q1', 'Q2', 'Q3', 'Q4']
}
$.each(data.categories, function(index, category){
var type = category.catTitle;
$.each(category.catYears, function(idx, year){
var quarter = [];
$.each(year.docs, function(i, doc){
quarter.push(doc.shortType)
});
if (schema[type] !== undefined ) {
$.each(schema[type], function(i, compare){
if ( $.inArray(compare, quarter) == -1 ) {
year.docs.push({
shortType: compare,
catClass: 'empty'
});
}
});
year.docs.sort(function(a,b) {
if (a.shortType b.shortType) return 1;
return 0;
});
}
});
});
},
complete: function(e) {
$(e.target).find('.financial-document-list').slick({
infinite: false,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: false,
draggable: false,
arrows: false,
swipe: false,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1
}
}
]
});
$('.financial-year-list').slick({
infinite: false,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: false,
asNavFor: '.financial-document-list',
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1
}
}
]
});
/* Slick Accessibility Fix */
$('.slick-slider').each(function(){
if ( !$(this).find('.slick-dots').length ) {
$('.slick-slide').each(function () {
var $slide = $(this).parent();
if ($(this).attr('aria-describedby') != undefined) {
$(this).removeAttr('aria-describedby');
}
});
}
});
}
});
});