collection in mobile is ok
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
end:0
|
||||
};
|
||||
var _corpus_promise;
|
||||
var _is_mobile = edlp_mobile.device_is_mobile;
|
||||
|
||||
// ___ _ _
|
||||
// |_ _|_ _ (_) |_
|
||||
@@ -24,19 +25,29 @@
|
||||
function init(){
|
||||
console.log("EdlpTheme init()");
|
||||
|
||||
|
||||
// if(!drupalSettings.path.isFront)
|
||||
// return;
|
||||
|
||||
initEvents();
|
||||
if(!_is_mobile){
|
||||
initEvents();
|
||||
|
||||
_audioPlayer = new AudioPlayer();
|
||||
_compoPlayer = new CompoPlayer();
|
||||
_audioPlayer = new AudioPlayer();
|
||||
_compoPlayer = new CompoPlayer();
|
||||
|
||||
checkLayout();
|
||||
|
||||
initAjaxLinks();
|
||||
checkLayout();
|
||||
|
||||
initHistory();
|
||||
initAjaxLinks();
|
||||
|
||||
initHistory();
|
||||
}else{
|
||||
if(drupalSettings.path.isFront){
|
||||
initHomeMobile();
|
||||
|
||||
}
|
||||
_$body.attr('booted', 'booted');
|
||||
}
|
||||
|
||||
|
||||
// if(!drupalSettings.path.isFront)
|
||||
@@ -45,6 +56,32 @@
|
||||
// initEvents();
|
||||
};
|
||||
|
||||
function initHomeMobile(){
|
||||
$('.field--name-field-notice, .index', '.entrees .taxonomy-term.vocabulary-entrees')
|
||||
.addClass('closed');
|
||||
$('.field--name-field-notice>.field__label', '.entrees .taxonomy-term.vocabulary-entrees')
|
||||
.on('click', onClickHomeMobileNotice);
|
||||
$('.index>.field__label', '.entrees .taxonomy-term.vocabulary-entrees')
|
||||
.on('click', onClickHomeMobileIndex);
|
||||
};
|
||||
|
||||
function onClickHomeMobileNotice(e){
|
||||
// console.log('onClickHomeMobileNotice');
|
||||
// var $part = $(this).parent();//parents('.taxonomy-term');
|
||||
toggleEntreeOpening($(this).parent(), 'notice');
|
||||
};
|
||||
|
||||
function onClickHomeMobileIndex(e){
|
||||
// console.log('onClickHomeMobileIndex');
|
||||
// var $part = $(this).parent();//parents('.taxonomy-term');
|
||||
toggleEntreeOpening($(this).parent(), 'index');
|
||||
};
|
||||
|
||||
function toggleEntreeOpening($e, part){
|
||||
$e.toggleClass('closed')
|
||||
.parents('.taxonomy-term.vocabulary-entrees.home_mobile').toggleClass(part+'-opened');
|
||||
}
|
||||
|
||||
// ___ _
|
||||
// | __|_ _____ _ _| |_ ___
|
||||
// | _|\ V / -_) ' \ _(_-<
|
||||
@@ -1750,7 +1787,7 @@
|
||||
} // end EdlpTheme()
|
||||
|
||||
$(document).ready(function($) {
|
||||
if(drupalSettings.path.isFront && !edlp_mobile.device_is_mobile){
|
||||
if(drupalSettings.path.isFront){
|
||||
var edlptheme = new EdlpTheme();
|
||||
}else{
|
||||
$('body').attr('booted', 'booted');
|
||||
|
||||
Reference in New Issue
Block a user