activated video filter and making it to work;
finded the way to call Drupal.behaviors after custom ajax : Drupal.attachBehaviors(context)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
var _$corpus_canvas;
|
||||
var _$content_container = $('main[role="main"]>.layout-content');
|
||||
var _$ajaxLinks;
|
||||
var _audio_player;
|
||||
|
||||
function init(){
|
||||
console.log("EdlpTheme init()");
|
||||
@@ -309,6 +310,11 @@
|
||||
_$body.addClass('ajax-loading');
|
||||
$link.addClass('ajax-loading');
|
||||
|
||||
// TODO: use Drupal.url()
|
||||
// Drupal.url = function (path) {
|
||||
// return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path;
|
||||
// };
|
||||
|
||||
var path = window.location.origin + drupalSettings.path.baseUrl + ajax_path;
|
||||
$.getJSON(path, {})
|
||||
.done(function(data){
|
||||
@@ -369,6 +375,9 @@
|
||||
|
||||
_$body.trigger({'type':'new-content-ajax-loaded'});
|
||||
|
||||
// TODO: call behaviours
|
||||
Drupal.attachBehaviors(_$content_container);
|
||||
|
||||
};
|
||||
|
||||
// ___
|
||||
@@ -388,6 +397,8 @@
|
||||
console.log('theme : corpus-cliked-on-node', e);
|
||||
_audio_player.openDocument(e.target_node);
|
||||
});
|
||||
|
||||
_$body.attr('corpus-map', 'ready');
|
||||
}
|
||||
|
||||
// ___ _ _ _
|
||||
|
||||
Reference in New Issue
Block a user