|
@@ -725,6 +725,7 @@ ${ assist.assistPanel() }
|
|
|
|
|
|
|
|
var loadedJs = [];
|
|
var loadedJs = [];
|
|
|
var loadedCss = [];
|
|
var loadedCss = [];
|
|
|
|
|
+ var loadedApps = [];
|
|
|
|
|
|
|
|
$('script[src]').each(function(){
|
|
$('script[src]').each(function(){
|
|
|
loadedJs.push($(this).attr('src'));
|
|
loadedJs.push($(this).attr('src'));
|
|
@@ -766,7 +767,13 @@ ${ assist.assistPanel() }
|
|
|
hueUtils.removeURLParameter('type');
|
|
hueUtils.removeURLParameter('type');
|
|
|
}
|
|
}
|
|
|
self.isLoadingEmbeddable(true);
|
|
self.isLoadingEmbeddable(true);
|
|
|
|
|
+ loadedApps.forEach(function (app) {
|
|
|
|
|
+ window.pauseAppIntervals(app);
|
|
|
|
|
+ });
|
|
|
if (typeof self.embeddable_cache[newVal] === 'undefined') {
|
|
if (typeof self.embeddable_cache[newVal] === 'undefined') {
|
|
|
|
|
+ if (loadedApps.indexOf(newVal) == -1){
|
|
|
|
|
+ loadedApps.push(newVal);
|
|
|
|
|
+ }
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
url: EMBEDDABLE_PAGE_URLS[newVal] + self.extraEmbeddableURLParams(),
|
|
url: EMBEDDABLE_PAGE_URLS[newVal] + self.extraEmbeddableURLParams(),
|
|
|
beforeSend: function (xhr) {
|
|
beforeSend: function (xhr) {
|
|
@@ -786,6 +793,7 @@ ${ assist.assistPanel() }
|
|
|
} else {
|
|
} else {
|
|
|
self.isLoadingEmbeddable(false);
|
|
self.isLoadingEmbeddable(false);
|
|
|
}
|
|
}
|
|
|
|
|
+ window.resumeAppIntervals(newVal);
|
|
|
$('.embeddable').hide();
|
|
$('.embeddable').hide();
|
|
|
$('#embeddable_' + newVal).insertBefore($('.embeddable:first')).show();
|
|
$('#embeddable_' + newVal).insertBefore($('.embeddable:first')).show();
|
|
|
});
|
|
});
|