fixes ajax login favorites links reload
This commit is contained in:
@@ -121,6 +121,7 @@
|
||||
console.log('onStudioLinkBlockLoaded', data);
|
||||
$('#block-studiouserlogin').replaceWith(data.blocks.studiolinkblock.rendered);
|
||||
initAjaxLinks();
|
||||
refreshFavoritesLinks();
|
||||
_$log_form.removeClass('ajax-loading');
|
||||
_$body.removeClass('ajax-loading');
|
||||
}
|
||||
@@ -990,7 +991,7 @@
|
||||
}
|
||||
}else{
|
||||
state.context = null;
|
||||
state.context = caller;
|
||||
// state.context = caller;
|
||||
}
|
||||
|
||||
|
||||
@@ -1005,6 +1006,17 @@
|
||||
return false;
|
||||
};
|
||||
|
||||
function refreshFavoritesLinks(){
|
||||
console.log("refreshFavoritesLinks", _states_history);
|
||||
// reload the active audioPlayer cartel
|
||||
_audioPlayer.reloadNode();
|
||||
|
||||
// current content (index)
|
||||
if(_states_history[0].view_mode == 'index' || _states_history[0].sys_path == "docsindex"){
|
||||
ajaxLoadContent(_states_history[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// ___
|
||||
// / __|___ _ _ _ __ _ _ ___
|
||||
// | (__/ _ \ '_| '_ \ || (_-<
|
||||
@@ -1129,6 +1141,7 @@
|
||||
this.cartelSwitchInterval = false;
|
||||
|
||||
// hiding
|
||||
this.visible = false;
|
||||
this.hideTimer = false;
|
||||
this.hideTimeMS = 15000;
|
||||
|
||||
@@ -1410,6 +1423,14 @@
|
||||
this.emmit('audio-ended');
|
||||
},
|
||||
// cartel functions
|
||||
reloadNode(){
|
||||
if(this.visible){
|
||||
if(!_is_mobile){
|
||||
console.log('reloadNode (cartel)');
|
||||
this.loadNode(this.historic[this.currentHistoricIndex].nid);
|
||||
}
|
||||
}
|
||||
},
|
||||
loadNode(nid){
|
||||
this.$cartel.addClass('loading');
|
||||
var vm = 'player_cartel';
|
||||
@@ -1452,6 +1473,7 @@
|
||||
},
|
||||
// global
|
||||
show(){
|
||||
this.visible = true;
|
||||
this.$container_parent.addClass('audio-player-visible');
|
||||
this.$container.addClass('visible');
|
||||
},
|
||||
@@ -1504,6 +1526,7 @@
|
||||
},
|
||||
hide(){
|
||||
// console.log('AudioPlayer hide()');
|
||||
this.visible = false;
|
||||
this.$container_parent.removeClass('audio-player-visible');
|
||||
this.$container.removeClass('visible');
|
||||
// trigger highlighted node remove on corpus map
|
||||
|
||||
Reference in New Issue
Block a user