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:
@@ -30,6 +30,7 @@ edlp_vars = {
|
||||
var _$corpus_canvas;
|
||||
var _$content_container = $('main[role="main"]>.layout-content');
|
||||
var _$ajaxLinks;
|
||||
var _audio_player;
|
||||
|
||||
function init(){
|
||||
console.log("EdlpTheme init()");
|
||||
@@ -332,6 +333,11 @@ edlp_vars = {
|
||||
_$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){
|
||||
@@ -392,6 +398,9 @@ edlp_vars = {
|
||||
|
||||
_$body.trigger({'type':'new-content-ajax-loaded'});
|
||||
|
||||
// TODO: call behaviours
|
||||
Drupal.attachBehaviors(_$content_container);
|
||||
|
||||
};
|
||||
|
||||
// ___
|
||||
@@ -411,6 +420,8 @@ edlp_vars = {
|
||||
console.log('theme : corpus-cliked-on-node', e);
|
||||
_audio_player.openDocument(e.target_node);
|
||||
});
|
||||
|
||||
_$body.attr('corpus-map', 'ready');
|
||||
}
|
||||
|
||||
// ___ _ _ _
|
||||
|
||||
@@ -1110,16 +1110,16 @@ header[role="banner"] {
|
||||
|
||||
main[role="main"] {
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 7em 2em 9em;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; }
|
||||
padding: 7em 2em 9em;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
height: auto; }
|
||||
main[role="main"] .layout-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -1130,6 +1130,9 @@ main[role="main"] {
|
||||
main[role="main"] .layout-content > * {
|
||||
pointer-events: auto; }
|
||||
|
||||
body[corpus-map="ready"] main[role="main"] {
|
||||
height: 100%; }
|
||||
|
||||
footer[role="contentinfo"] {
|
||||
z-index: 2;
|
||||
position: fixed;
|
||||
@@ -2138,3 +2141,27 @@ footer {
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
right: 1em; }
|
||||
|
||||
.url-to-video-container {
|
||||
margin: 10px auto; }
|
||||
.url-to-video-container.no-js {
|
||||
border: solid black 1px; }
|
||||
.url-to-video-container.no-js .url-to-video-player {
|
||||
cursor: auto; }
|
||||
.url-to-video-container .loader {
|
||||
top: auto;
|
||||
left: auto;
|
||||
-webkit-transform: none;
|
||||
transform: none; }
|
||||
.url-to-video-container span.url-to-video-player {
|
||||
/* assuming that the video has a 16:9 ratio */
|
||||
padding-bottom: 0;
|
||||
height: auto; }
|
||||
.url-to-video-container span.url-to-video-player:before {
|
||||
content: "";
|
||||
display: block;
|
||||
/* assuming that the video has a 16:9 ratio */
|
||||
padding-top: 56.25%; }
|
||||
.url-to-video-container span.url-to-video-player .play-button {
|
||||
z-index: 5;
|
||||
top: 50%; }
|
||||
|
||||
Reference in New Issue
Block a user