|
@@ -262,20 +262,26 @@
|
|
};
|
|
};
|
|
function onAjaxLoaded(data, state){
|
|
function onAjaxLoaded(data, state){
|
|
console.log('ajax loaded', state, data);
|
|
console.log('ajax loaded', state, data);
|
|
|
|
+
|
|
|
|
+ var $rendered = $(data.rendered);
|
|
|
|
+ $rendered.attr({
|
|
|
|
+ 'sys_path':state.sys_path,
|
|
|
|
+ 'view_mode': state.view_mode
|
|
|
|
+ });
|
|
// console.log(data);
|
|
// console.log(data);
|
|
// reset all style may been added by other pages (like masonry for productions)
|
|
// reset all style may been added by other pages (like masonry for productions)
|
|
// and replace all content with newly loaded
|
|
// and replace all content with newly loaded
|
|
// TODO: build a system to replace or append contents (like studio + search)
|
|
// TODO: build a system to replace or append contents (like studio + search)
|
|
if(data.entity_type == "node" && data.bundle == "evenement"){
|
|
if(data.entity_type == "node" && data.bundle == "evenement"){
|
|
if(_$row.find('.col.event').length){
|
|
if(_$row.find('.col.event').length){
|
|
- _$row.find('.col.event').replaceWith(data.rendered);
|
|
|
|
|
|
+ _$row.find('.col.event').replaceWith($rendered);
|
|
}else if(_$row.find('.col.aside').length){
|
|
}else if(_$row.find('.col.aside').length){
|
|
- _$row.find('.col.aside').replaceWith(data.rendered);
|
|
|
|
|
|
+ _$row.find('.col.aside').replaceWith($rendered);
|
|
}else{
|
|
}else{
|
|
- _$row.append(data.rendered);
|
|
|
|
|
|
+ _$row.append($rendered);
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- _$row.removeAttr('style').html(data.rendered);
|
|
|
|
|
|
+ _$row.removeAttr('style').html($rendered);
|
|
}
|
|
}
|
|
|
|
|
|
// add body class for currently loaded content
|
|
// add body class for currently loaded content
|
|
@@ -491,6 +497,11 @@
|
|
}
|
|
}
|
|
checkRowEmpty();
|
|
checkRowEmpty();
|
|
checkVisibleCorpusMapSpace();
|
|
checkVisibleCorpusMapSpace();
|
|
|
|
+
|
|
|
|
+ // set links to this modal to not active (tested on articles from audio cartel)
|
|
|
|
+ if( $col.attr('view_mode') && $col.attr('sys_path')){
|
|
|
|
+ $('a[data-drupal-link-system-path="'+$col.attr('sys_path')+'"][viewmode="'+$col.attr('view_mode')+'"]').removeClass('is-active');
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
// _ _ ___ _ _
|
|
// _ _ ___ _ _
|