display imporovement (fonts) + agenda nav + prod linked events nav

This commit is contained in:
2018-04-15 21:45:13 +02:00
parent 4967111a0e
commit c5ae3d6b00
15 changed files with 505 additions and 331 deletions
@@ -14,7 +14,6 @@ if(edlp.redirect){
window.localStorage.setItem('edlp_origin', JSON.stringify(edlp));
// redirect to home
// debugger;
window.location.replace(window.location.origin+'/'+edlp.lang_code);
}else{
console.log('history do not redirect');
@@ -169,7 +169,17 @@
// reset all style may been added by other pages (like masonry for productions)
// and replace all content with newly loaded
// TODO: build a system to replace or append contents (like studio + search)
_$row.removeAttr('style').html(data.rendered);
if(data.entity_type == "node" && data.bundle == "evenement"){
if(_$row.find('.col.event').length){
_$row.find('.col.event').replaceWith(data.rendered);
}else if(_$row.find('.col.aside').length){
_$row.find('.col.aside').replaceWith(data.rendered);
}else{
_$row.append(data.rendered);
}
}else{
_$row.removeAttr('style').html(data.rendered);
}
// add body class for currently loaded content
var body_classes = [