File: view-group.movies.movies-header.js
/*******************************************************************************
* Copyright (c) 2017 Genialist Software Ltd.
* All rights reserved.
******************************************************************************/
pApplicationUI.disable_showToolbar = true;
var id = pMediaLibrary.getIDfromURL();
var library_id = pMediaLibrary.getLibraryIDfromURL();
pMoviePlaylist.title = pPage.title;
pMoviePlaylist.url_incr = url_prefix+library_id+'/movies.movies/'+id+'?action=incr-play';
pMoviePlaylist.url_reset = url_prefix+library_id+'/movies.movies/'+id+'?action=reset-play';
function showMovieMenu(noclose) {
var x = pElement.x('movie');
if (pDocument.isShown('movie-play-default-menu') && !noclose) {
pDocument.hideSmooth('movie-play-default-menu');
pElement.setTextContent('button-expand-toolbar', '\u2228');
if (x) {
x.style.top = 'auto';
x.style.bottom = '0px';
}
}
else {
//pElement.x('movie').style.top = pDocument.top('movie')+'px';
//pElement.x('movie').style.bottom = 'auto';
pMoviePlaylist.resizeDefaultMenu();
/*
var i_top = 58;
var i_h = pDocument.showSmooth('movie-play-default-menu', null);
//console.log('height: '+i_h + ' w: ' + window.innerHeight);
i_h = pDocument.height(x);//parseInt(i_h.substring(0, i_h.indexOf('px')));
if (i_h + i_top > window.innerHeight) {
x.style.top = i_top+'px';
x.style.bottom = 'auto';
}
else {
x.style.top = 'auto';
x.style.bottom = '0';
}
*/
setTimeout(function() { pDocument.scrollTo('movie'); }, 500);
pElement.setTextContent('button-expand-toolbar', '\u2227');
}
}
pMoviePlaylist.resizeDefaultMenu = function() {
if (pDialog.isDialogOn())
return;
var x = pElement.x('movie');
if (x) {
var i_top = 58, i_h = pDocument.showSmooth('movie-play-default-menu', null);
//console.log('height: '+i_h + ' w: ' + window.innerHeight);
i_h = pDocument.height(x);//parseInt(i_h.substring(0, i_h.indexOf('px')));
//var m = window.innerHeight, d = document.getElementsByClassName('dialog-question-frame').item(0);
if (i_h + i_top > window.innerHeight) {
x.style.top = i_top+'px';
x.style.bottom = 'auto';
}
else {
x.style.top = 'auto';
x.style.bottom = '0';
}
}
};
pMediaLibrary.autoRefreshBackdrop();
/******************************************************************************/
/*** END OF FILE ************************************************************/
/******************************************************************************/