search is ok! (remains to sync search and corpus map
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
var _$body = $('body');
|
||||
var _is_front = _$body.is('.path-frontpage');
|
||||
var _$corpus_canvas;
|
||||
var _$content_container = $('main[role="main"]>.layout-content');
|
||||
var _$row = $('main[role="main"]>.layout-content>.row');
|
||||
var _$ajaxLinks;
|
||||
var _audio_player;
|
||||
var _randomPlayer;
|
||||
@@ -41,6 +41,9 @@
|
||||
.on('on-studio-chutier-updated', function(e){
|
||||
initAjaxLinks();
|
||||
})
|
||||
.on('search-results-loaded',function(e){
|
||||
initAjaxLinks();
|
||||
})
|
||||
.on('open_entree', function(e){
|
||||
// e.tid available
|
||||
closeAllModals();
|
||||
@@ -410,7 +413,9 @@
|
||||
_$body.removeClass('ajax-loading');
|
||||
|
||||
// replace all content with newly loaded
|
||||
_$content_container.html(data.rendered);
|
||||
// TODO: build a system to replace or append contents (like studio + search)
|
||||
|
||||
_$row.html(data.rendered);
|
||||
|
||||
// add body class for currently loaded content
|
||||
var body_classes = [
|
||||
@@ -448,7 +453,7 @@
|
||||
_$body.trigger({'type':'new-content-ajax-loaded'});
|
||||
|
||||
// TODO: call behaviours
|
||||
Drupal.attachBehaviors(_$content_container);
|
||||
Drupal.attachBehaviors(_$row[0]);
|
||||
|
||||
};
|
||||
|
||||
@@ -553,7 +558,7 @@
|
||||
// |_| |_| \___/\__,_|\_,_\__|\__|_\___/_||_/__/
|
||||
function initProductions(){
|
||||
console.log('theme : initProductions');
|
||||
var $grid = $('.row', _$content_container).masonry({
|
||||
var $grid = $('.row', _$row).masonry({
|
||||
itemSelector:'.col',
|
||||
columnWidth:'.col-2'
|
||||
});
|
||||
@@ -562,7 +567,7 @@
|
||||
$grid.imagesLoaded().progress( function() {
|
||||
$grid.masonry('layout');
|
||||
});
|
||||
// var $grid = $('.row', _$content_container).imagesLoaded( function() {
|
||||
// var $grid = $('.row', _$row).imagesLoaded( function() {
|
||||
// // init Masonry after all images have loaded
|
||||
// $grid.masonry({
|
||||
// itemSelector:'.col',
|
||||
@@ -591,7 +596,7 @@
|
||||
function closeAllModals(){
|
||||
console.log('theme : closeAllModals');
|
||||
// TODO: animate the remove
|
||||
_$content_container.html('');
|
||||
_$row.html('');
|
||||
_$ajaxLinks.removeClass('is-active');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user