auto load article on audio open if map's articl filter is on
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
var _nodes = [];
|
var _nodes = [];
|
||||||
var _articles_nodes = [];
|
var _articles_nodes = [];
|
||||||
var _no_articles_nodes = [];
|
var _no_articles_nodes = [];
|
||||||
|
var _articles_filter_on = false;
|
||||||
var _nodes_by_entries = {};
|
var _nodes_by_entries = {};
|
||||||
var _nodes_by_nid = {};
|
var _nodes_by_nid = {};
|
||||||
var _nodes_Nid_Id = {};
|
var _nodes_Nid_Id = {};
|
||||||
@@ -56,16 +57,16 @@
|
|||||||
var _settings = drupalSettings.edlp_corpus;
|
var _settings = drupalSettings.edlp_corpus;
|
||||||
var _ecolors = _settings.colors;
|
var _ecolors = _settings.colors;
|
||||||
// Physics
|
// Physics
|
||||||
var _attracter,
|
var _attracter;
|
||||||
_repulser_top,
|
// _repulser_top,
|
||||||
_repulser_center,
|
// _repulser_center,
|
||||||
_repulser_bottom,
|
// _repulser_bottom,
|
||||||
_scrambler_TL,
|
// _scrambler_TL,
|
||||||
_scrambler_TR,
|
// _scrambler_TR,
|
||||||
_scrambler_BR,
|
// _scrambler_BR,
|
||||||
_scrambler_BL,
|
// _scrambler_BL,
|
||||||
_scrambler_CL,
|
// _scrambler_CL,
|
||||||
_scrambler_CR;
|
// _scrambler_CR;
|
||||||
|
|
||||||
// ____ _ __
|
// ____ _ __
|
||||||
// / _/___ (_) /______
|
// / _/___ (_) /______
|
||||||
@@ -772,24 +773,26 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).toggleClass('is-active');
|
$(this).toggleClass('is-active');
|
||||||
if($(this).is('.is-active')){
|
if($(this).is('.is-active')){
|
||||||
filterArticles();
|
activateArticlesFilter();
|
||||||
closeAllEntries();
|
closeAllEntries();
|
||||||
}else{
|
}else{
|
||||||
resetArticlesFilter();
|
deactivateArticlesFilter();
|
||||||
}
|
}
|
||||||
// _$canvas.trigger({
|
// _$canvas.trigger({
|
||||||
// 'type':'corpus-cliqued-on-articles'
|
// 'type':'corpus-cliqued-on-articles'
|
||||||
// });
|
// });
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
function filterArticles(){
|
function activateArticlesFilter(){
|
||||||
//console.log('filterArticles');
|
//console.log('activateArticlesFilter');
|
||||||
|
_articles_filter_on = true;
|
||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].fade();
|
_no_articles_nodes[i].fade();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function resetArticlesFilter(){
|
function deactivateArticlesFilter(){
|
||||||
//console.log('resetArticlesFilter');
|
//console.log('deactivateArticlesFilter');
|
||||||
|
_articles_filter_on = false;
|
||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].unFade();
|
_no_articles_nodes[i].unFade();
|
||||||
}
|
}
|
||||||
@@ -830,6 +833,7 @@
|
|||||||
var event = {
|
var event = {
|
||||||
'type':'corpus-cliked-on-node',
|
'type':'corpus-cliked-on-node',
|
||||||
'target_node':_nodes[_node_hover_id],
|
'target_node':_nodes[_node_hover_id],
|
||||||
|
'article':_articles_filter_on
|
||||||
};
|
};
|
||||||
_$canvas.trigger(event);
|
_$canvas.trigger(event);
|
||||||
// instead of directly opening the doc, create an event listener (e.g. : audio played from random)
|
// instead of directly opening the doc, create an event listener (e.g. : audio played from random)
|
||||||
@@ -837,6 +841,7 @@
|
|||||||
}else{
|
}else{
|
||||||
// console.log('corpus : click on map');
|
// console.log('corpus : click on map');
|
||||||
_$canvas.trigger('corpus-cliked-on-map');
|
_$canvas.trigger('corpus-cliked-on-map');
|
||||||
|
shutDownArticles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
var _nodes = [];
|
var _nodes = [];
|
||||||
var _articles_nodes = [];
|
var _articles_nodes = [];
|
||||||
var _no_articles_nodes = [];
|
var _no_articles_nodes = [];
|
||||||
|
var _articles_filter_on = false;
|
||||||
var _nodes_by_entries = {};
|
var _nodes_by_entries = {};
|
||||||
var _nodes_by_nid = {};
|
var _nodes_by_nid = {};
|
||||||
var _nodes_Nid_Id = {};
|
var _nodes_Nid_Id = {};
|
||||||
@@ -56,16 +57,16 @@
|
|||||||
var _settings = drupalSettings.edlp_corpus;
|
var _settings = drupalSettings.edlp_corpus;
|
||||||
var _ecolors = _settings.colors;
|
var _ecolors = _settings.colors;
|
||||||
// Physics
|
// Physics
|
||||||
var _attracter,
|
var _attracter;
|
||||||
_repulser_top,
|
// _repulser_top,
|
||||||
_repulser_center,
|
// _repulser_center,
|
||||||
_repulser_bottom,
|
// _repulser_bottom,
|
||||||
_scrambler_TL,
|
// _scrambler_TL,
|
||||||
_scrambler_TR,
|
// _scrambler_TR,
|
||||||
_scrambler_BR,
|
// _scrambler_BR,
|
||||||
_scrambler_BL,
|
// _scrambler_BL,
|
||||||
_scrambler_CL,
|
// _scrambler_CL,
|
||||||
_scrambler_CR;
|
// _scrambler_CR;
|
||||||
|
|
||||||
// ____ _ __
|
// ____ _ __
|
||||||
// / _/___ (_) /______
|
// / _/___ (_) /______
|
||||||
@@ -772,24 +773,26 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).toggleClass('is-active');
|
$(this).toggleClass('is-active');
|
||||||
if($(this).is('.is-active')){
|
if($(this).is('.is-active')){
|
||||||
filterArticles();
|
activateArticlesFilter();
|
||||||
closeAllEntries();
|
closeAllEntries();
|
||||||
}else{
|
}else{
|
||||||
resetArticlesFilter();
|
deactivateArticlesFilter();
|
||||||
}
|
}
|
||||||
// _$canvas.trigger({
|
// _$canvas.trigger({
|
||||||
// 'type':'corpus-cliqued-on-articles'
|
// 'type':'corpus-cliqued-on-articles'
|
||||||
// });
|
// });
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
function filterArticles(){
|
function activateArticlesFilter(){
|
||||||
//console.log('filterArticles');
|
//console.log('activateArticlesFilter');
|
||||||
|
_articles_filter_on = true;
|
||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].fade();
|
_no_articles_nodes[i].fade();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function resetArticlesFilter(){
|
function deactivateArticlesFilter(){
|
||||||
//console.log('resetArticlesFilter');
|
//console.log('deactivateArticlesFilter');
|
||||||
|
_articles_filter_on = false;
|
||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].unFade();
|
_no_articles_nodes[i].unFade();
|
||||||
}
|
}
|
||||||
@@ -830,6 +833,7 @@
|
|||||||
var event = {
|
var event = {
|
||||||
'type':'corpus-cliked-on-node',
|
'type':'corpus-cliked-on-node',
|
||||||
'target_node':_nodes[_node_hover_id],
|
'target_node':_nodes[_node_hover_id],
|
||||||
|
'article':_articles_filter_on
|
||||||
};
|
};
|
||||||
_$canvas.trigger(event);
|
_$canvas.trigger(event);
|
||||||
// instead of directly opening the doc, create an event listener (e.g. : audio played from random)
|
// instead of directly opening the doc, create an event listener (e.g. : audio played from random)
|
||||||
@@ -837,6 +841,7 @@
|
|||||||
}else{
|
}else{
|
||||||
// console.log('corpus : click on map');
|
// console.log('corpus : click on map');
|
||||||
_$canvas.trigger('corpus-cliked-on-map');
|
_$canvas.trigger('corpus-cliked-on-map');
|
||||||
|
shutDownArticles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
// check for viewmode attribute
|
// check for viewmode attribute
|
||||||
if(view_mode){
|
if(view_mode){
|
||||||
state.ajax_path += '/'+view_mode;
|
state.ajax_path += '/'+view_mode;
|
||||||
|
state.view_mode = view_mode;
|
||||||
}
|
}
|
||||||
}else if(term_match){
|
}else if(term_match){
|
||||||
// terms are always entrees, there's no other vocabulary links in front
|
// terms are always entrees, there's no other vocabulary links in front
|
||||||
@@ -148,7 +149,7 @@
|
|||||||
return state;
|
return state;
|
||||||
};
|
};
|
||||||
function ajaxLoadContent(state){
|
function ajaxLoadContent(state){
|
||||||
console.log('ajaxLoadContent : url', state.url);
|
console.log('ajaxLoadContent : state', state);
|
||||||
_$body.addClass('ajax-loading');
|
_$body.addClass('ajax-loading');
|
||||||
|
|
||||||
var path = window.location.origin + Drupal.url(state.ajax_path);
|
var path = window.location.origin + Drupal.url(state.ajax_path);
|
||||||
@@ -166,7 +167,7 @@
|
|||||||
_$body.removeClass('ajax-loading');
|
_$body.removeClass('ajax-loading');
|
||||||
};
|
};
|
||||||
function onAjaxLoaded(data, state){
|
function onAjaxLoaded(data, state){
|
||||||
console.log('ajax loaded url:'+state.url+' ajax_path:'+state.ajax_path+' sys_path:'+state.sys_path);
|
console.log('ajax loaded : state', state);
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
// reset all style may been added by other pages (like masonry for productions)
|
// reset all style may been added by other pages (like masonry for productions)
|
||||||
// and replace all content with newly loaded
|
// and replace all content with newly loaded
|
||||||
@@ -200,7 +201,7 @@
|
|||||||
|
|
||||||
// handle clicked link classes
|
// handle clicked link classes
|
||||||
$('.ajax-loading').removeClass('ajax-loading');
|
$('.ajax-loading').removeClass('ajax-loading');
|
||||||
$('.is-active').removeClass('is-active');
|
$('.ajax-link.is-active').removeClass('is-active');
|
||||||
$('.is-active-trail').removeClass('is-active-trail');
|
$('.is-active-trail').removeClass('is-active-trail');
|
||||||
|
|
||||||
if(typeof state.selector != 'undefined'){
|
if(typeof state.selector != 'undefined'){
|
||||||
@@ -302,11 +303,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function initAudioLinksInContent(){
|
function initAudioLinksInContent(){
|
||||||
// console.log('initAudioLinksInContent');
|
|
||||||
_$row.find('a.audio-link')
|
_$row.find('a.audio-link')
|
||||||
.on('mouseover', function(event) {
|
.on('mouseover', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// console.log('onmouseover audio-link');
|
|
||||||
if(_corpus_ready){
|
if(_corpus_ready){
|
||||||
_$corpus_canvas.trigger({
|
_$corpus_canvas.trigger({
|
||||||
type:'mouseover-audio-link',
|
type:'mouseover-audio-link',
|
||||||
@@ -316,7 +315,6 @@
|
|||||||
})
|
})
|
||||||
.on('mouseout', function(event) {
|
.on('mouseout', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// console.log('onmouseout audio-link');
|
|
||||||
if(_corpus_ready){
|
if(_corpus_ready){
|
||||||
_$corpus_canvas.trigger({
|
_$corpus_canvas.trigger({
|
||||||
type:'mouseout-audio-link',
|
type:'mouseout-audio-link',
|
||||||
@@ -570,6 +568,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var view_mode = $link.attr('viewmode');
|
var view_mode = $link.attr('viewmode');
|
||||||
|
|
||||||
var state = getSysPathState(sys_path, view_mode);
|
var state = getSysPathState(sys_path, view_mode);
|
||||||
state.url = $(this).attr('href');
|
state.url = $(this).attr('href');
|
||||||
|
|
||||||
@@ -588,7 +587,6 @@
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ___
|
// ___
|
||||||
// / __|___ _ _ _ __ _ _ ___
|
// / __|___ _ _ _ __ _ _ ___
|
||||||
// | (__/ _ \ '_| '_ \ || (_-<
|
// | (__/ _ \ '_| '_ \ || (_-<
|
||||||
@@ -607,6 +605,7 @@
|
|||||||
//console.log('theme : corpus-cliked-on-node', e);
|
//console.log('theme : corpus-cliked-on-node', e);
|
||||||
_audioPlayer
|
_audioPlayer
|
||||||
.emmit('stop-shuffle')
|
.emmit('stop-shuffle')
|
||||||
|
.setAutoOpenArticle(e.article)
|
||||||
.openDocument(e.target_node);
|
.openDocument(e.target_node);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -678,6 +677,9 @@
|
|||||||
this.historic = [];
|
this.historic = [];
|
||||||
this.shuffle_is_active = false;
|
this.shuffle_is_active = false;
|
||||||
|
|
||||||
|
// artciles
|
||||||
|
this.auto_open_article = false;
|
||||||
|
|
||||||
// object events
|
// object events
|
||||||
this.event_handlers = {
|
this.event_handlers = {
|
||||||
'audio-open-document':[],
|
'audio-open-document':[],
|
||||||
@@ -821,7 +823,8 @@
|
|||||||
// debugger;
|
// debugger;
|
||||||
this.audio.pause();
|
this.audio.pause();
|
||||||
// don't close player if article or transcript is open
|
// don't close player if article or transcript is open
|
||||||
if(!_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)){
|
if(!(_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)
|
||||||
|
&& (_$body.is('.view-mode-article') || _$body.is('.view-mode-transcript')))){
|
||||||
this.timeOutToHide();
|
this.timeOutToHide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -865,11 +868,19 @@
|
|||||||
this.$cartel.html(data.rendered).removeClass('loading');
|
this.$cartel.html(data.rendered).removeClass('loading');
|
||||||
_$body.trigger({'type':'new-audio-cartel-loaded'});
|
_$body.trigger({'type':'new-audio-cartel-loaded'});
|
||||||
initAjaxLinks();
|
initAjaxLinks();
|
||||||
|
if(this.auto_open_article){
|
||||||
|
this.$cartel.find('a.link-article').trigger('click');
|
||||||
|
this.auto_open_article = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onNodeLoadFail(jqxhr, textStatus, error){
|
onNodeLoadFail(jqxhr, textStatus, error){
|
||||||
console.warn('AudioPlayer node load failed', jqxhr.responseText);
|
console.warn('AudioPlayer node load failed', jqxhr.responseText);
|
||||||
this.$cartel.removeClass('loading').html('');
|
this.$cartel.removeClass('loading').html('');
|
||||||
},
|
},
|
||||||
|
setAutoOpenArticle(art){
|
||||||
|
this.auto_open_article = art;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
// global
|
// global
|
||||||
show(){
|
show(){
|
||||||
this.$container.addClass('visible');
|
this.$container.addClass('visible');
|
||||||
@@ -1317,7 +1328,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ___ _ _ _
|
// ___ _ _ _
|
||||||
// | __|_ _ _ _ ___ __ _(_)__| |_ _ _ ___ _ __ ___ _ _| |_
|
// | __|_ _ _ _ ___ __ _(_)__| |_ _ _ ___ _ __ ___ _ _| |_
|
||||||
// | _|| ' \| '_/ -_) _` | (_-< _| '_/ -_) ' \/ -_) ' \ _|
|
// | _|| ' \| '_/ -_) _` | (_-< _| '_/ -_) ' \/ -_) ' \ _|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
// check for viewmode attribute
|
// check for viewmode attribute
|
||||||
if(view_mode){
|
if(view_mode){
|
||||||
state.ajax_path += '/'+view_mode;
|
state.ajax_path += '/'+view_mode;
|
||||||
|
state.view_mode = view_mode;
|
||||||
}
|
}
|
||||||
}else if(term_match){
|
}else if(term_match){
|
||||||
// terms are always entrees, there's no other vocabulary links in front
|
// terms are always entrees, there's no other vocabulary links in front
|
||||||
@@ -148,7 +149,7 @@
|
|||||||
return state;
|
return state;
|
||||||
};
|
};
|
||||||
function ajaxLoadContent(state){
|
function ajaxLoadContent(state){
|
||||||
console.log('ajaxLoadContent : url', state.url);
|
console.log('ajaxLoadContent : state', state);
|
||||||
_$body.addClass('ajax-loading');
|
_$body.addClass('ajax-loading');
|
||||||
|
|
||||||
var path = window.location.origin + Drupal.url(state.ajax_path);
|
var path = window.location.origin + Drupal.url(state.ajax_path);
|
||||||
@@ -166,7 +167,7 @@
|
|||||||
_$body.removeClass('ajax-loading');
|
_$body.removeClass('ajax-loading');
|
||||||
};
|
};
|
||||||
function onAjaxLoaded(data, state){
|
function onAjaxLoaded(data, state){
|
||||||
console.log('ajax loaded url:'+state.url+' ajax_path:'+state.ajax_path+' sys_path:'+state.sys_path);
|
console.log('ajax loaded : state', state);
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
// reset all style may been added by other pages (like masonry for productions)
|
// reset all style may been added by other pages (like masonry for productions)
|
||||||
// and replace all content with newly loaded
|
// and replace all content with newly loaded
|
||||||
@@ -200,7 +201,7 @@
|
|||||||
|
|
||||||
// handle clicked link classes
|
// handle clicked link classes
|
||||||
$('.ajax-loading').removeClass('ajax-loading');
|
$('.ajax-loading').removeClass('ajax-loading');
|
||||||
$('.is-active').removeClass('is-active');
|
$('.ajax-link.is-active').removeClass('is-active');
|
||||||
$('.is-active-trail').removeClass('is-active-trail');
|
$('.is-active-trail').removeClass('is-active-trail');
|
||||||
|
|
||||||
if(typeof state.selector != 'undefined'){
|
if(typeof state.selector != 'undefined'){
|
||||||
@@ -302,11 +303,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function initAudioLinksInContent(){
|
function initAudioLinksInContent(){
|
||||||
// console.log('initAudioLinksInContent');
|
|
||||||
_$row.find('a.audio-link')
|
_$row.find('a.audio-link')
|
||||||
.on('mouseover', function(event) {
|
.on('mouseover', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// console.log('onmouseover audio-link');
|
|
||||||
if(_corpus_ready){
|
if(_corpus_ready){
|
||||||
_$corpus_canvas.trigger({
|
_$corpus_canvas.trigger({
|
||||||
type:'mouseover-audio-link',
|
type:'mouseover-audio-link',
|
||||||
@@ -316,7 +315,6 @@
|
|||||||
})
|
})
|
||||||
.on('mouseout', function(event) {
|
.on('mouseout', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// console.log('onmouseout audio-link');
|
|
||||||
if(_corpus_ready){
|
if(_corpus_ready){
|
||||||
_$corpus_canvas.trigger({
|
_$corpus_canvas.trigger({
|
||||||
type:'mouseout-audio-link',
|
type:'mouseout-audio-link',
|
||||||
@@ -570,6 +568,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var view_mode = $link.attr('viewmode');
|
var view_mode = $link.attr('viewmode');
|
||||||
|
|
||||||
var state = getSysPathState(sys_path, view_mode);
|
var state = getSysPathState(sys_path, view_mode);
|
||||||
state.url = $(this).attr('href');
|
state.url = $(this).attr('href');
|
||||||
|
|
||||||
@@ -588,7 +587,6 @@
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ___
|
// ___
|
||||||
// / __|___ _ _ _ __ _ _ ___
|
// / __|___ _ _ _ __ _ _ ___
|
||||||
// | (__/ _ \ '_| '_ \ || (_-<
|
// | (__/ _ \ '_| '_ \ || (_-<
|
||||||
@@ -607,6 +605,7 @@
|
|||||||
//console.log('theme : corpus-cliked-on-node', e);
|
//console.log('theme : corpus-cliked-on-node', e);
|
||||||
_audioPlayer
|
_audioPlayer
|
||||||
.emmit('stop-shuffle')
|
.emmit('stop-shuffle')
|
||||||
|
.setAutoOpenArticle(e.article)
|
||||||
.openDocument(e.target_node);
|
.openDocument(e.target_node);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -678,6 +677,9 @@
|
|||||||
this.historic = [];
|
this.historic = [];
|
||||||
this.shuffle_is_active = false;
|
this.shuffle_is_active = false;
|
||||||
|
|
||||||
|
// artciles
|
||||||
|
this.auto_open_article = false;
|
||||||
|
|
||||||
// object events
|
// object events
|
||||||
this.event_handlers = {
|
this.event_handlers = {
|
||||||
'audio-open-document':[],
|
'audio-open-document':[],
|
||||||
@@ -821,7 +823,8 @@
|
|||||||
// debugger;
|
// debugger;
|
||||||
this.audio.pause();
|
this.audio.pause();
|
||||||
// don't close player if article or transcript is open
|
// don't close player if article or transcript is open
|
||||||
if(!_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)){
|
if(!(_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)
|
||||||
|
&& (_$body.is('.view-mode-article') || _$body.is('.view-mode-transcript')))){
|
||||||
this.timeOutToHide();
|
this.timeOutToHide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -865,11 +868,19 @@
|
|||||||
this.$cartel.html(data.rendered).removeClass('loading');
|
this.$cartel.html(data.rendered).removeClass('loading');
|
||||||
_$body.trigger({'type':'new-audio-cartel-loaded'});
|
_$body.trigger({'type':'new-audio-cartel-loaded'});
|
||||||
initAjaxLinks();
|
initAjaxLinks();
|
||||||
|
if(this.auto_open_article){
|
||||||
|
this.$cartel.find('a.link-article').trigger('click');
|
||||||
|
this.auto_open_article = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onNodeLoadFail(jqxhr, textStatus, error){
|
onNodeLoadFail(jqxhr, textStatus, error){
|
||||||
console.warn('AudioPlayer node load failed', jqxhr.responseText);
|
console.warn('AudioPlayer node load failed', jqxhr.responseText);
|
||||||
this.$cartel.removeClass('loading').html('');
|
this.$cartel.removeClass('loading').html('');
|
||||||
},
|
},
|
||||||
|
setAutoOpenArticle(art){
|
||||||
|
this.auto_open_article = art;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
// global
|
// global
|
||||||
show(){
|
show(){
|
||||||
this.$container.addClass('visible');
|
this.$container.addClass('visible');
|
||||||
@@ -1317,7 +1328,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// ___ _ _ _
|
// ___ _ _ _
|
||||||
// | __|_ _ _ _ ___ __ _(_)__| |_ _ _ ___ _ __ ___ _ _| |_
|
// | __|_ _ _ _ ___ __ _(_)__| |_ _ _ ___ _ __ ___ _ _| |_
|
||||||
// | _|| ' \| '_/ -_) _` | (_-< _| '_/ -_) ' \/ -_) ' \ _|
|
// | _|| ' \| '_/ -_) _` | (_-< _| '_/ -_) ' \/ -_) ' \ _|
|
||||||
|
|||||||
Reference in New Issue
Block a user