Global Setting Information on Instances

If a setting page is only changeable globally and instance != 0 is set a notification is shown
thanks @b1rdhous3
This commit is contained in:
b1rdhous3
2019-07-29 19:39:05 +02:00
committed by Paulchen-Panther
parent ce2f0a17d5
commit 1960f7652d
4 changed files with 29 additions and 2 deletions

View File

@@ -114,6 +114,7 @@ function loadContent(event, forceRefresh)
$("#page-content").html('<h3>'+$.i18n('info_404')+'</h3>');
removeOverlay();
}
updateUiOnInstance(window.currentHyperionInstance);
});
}
}
@@ -161,6 +162,22 @@ function updateHyperionInstanceListing()
}
}
function updateUiOnInstance(inst)
{
if(inst != 0)
{
var currentURL = $(location).attr("href");
if(currentURL.indexOf('#conf_network') != -1 || currentURL.indexOf('#update') != -1 || currentURL.indexOf('#conf_webconfig') != -1 || currentURL.indexOf('#conf_grabber') != -1 || currentURL.indexOf('#conf_logging') != -1)
$("#hyperion_global_setting_notify").fadeIn("fast");
else
$("#hyperion_global_setting_notify").attr("style", "display:none");
}
else
{
$("#hyperion_global_setting_notify").fadeOut("fast");
}
}
function loadContentTo(containerId, fileName)
{
$(containerId).load("/content/"+fileName+".html");