WebUi: New Internet API logic, correct switch to last instance after refresh, current instance notification (#608)

* Added new restricted ip api checkbox, initial instance localStorage support

* Added instance notification, added correct instance switch after page refresh (to last current instance)

* Optimize intention in wizard.js

* ":" from i18n json to code

* Changes for Responsive about site
This commit is contained in:
b1rdhous3
2019-08-21 17:46:49 +02:00
committed by brindosch
parent 1093278d16
commit 18d6345968
10 changed files with 854 additions and 813 deletions

View File

@@ -81,4 +81,3 @@ $(document).ready( function() {
removeOverlay();
});

View File

@@ -95,6 +95,10 @@ function loadContent(event, forceRefresh)
{
var tag;
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
if(lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
instanceSwitch(lastSelectedInstance);
if(typeof event != "undefined")
{
tag = event.currentTarget.hash;
@@ -154,10 +158,7 @@ function updateHyperionInstanceListing()
$('#hyperioninstance_'+data[key].instance).off().on("click",function(e){
var inst = e.currentTarget.id.split("_")[1]
requestInstanceSwitch(inst)
window.currentHyperionInstance = inst;
window.currentHyperionInstanceName = getInstanceNameByIndex(inst);
updateHyperionInstanceListing()
instanceSwitch(inst)
});
}
}
@@ -171,13 +172,26 @@ function updateUiOnInstance(inst)
$("#hyperion_global_setting_notify").fadeIn("fast");
else
$("#hyperion_global_setting_notify").attr("style", "display:none");
$("#dashboard_active_instance_friendly_name").html($.i18n('dashboard_active_instance') + ': ' + window.serverInfo.instance[inst].friendly_name);
$("#dashboard_active_instance").removeAttr("style");
}
else
{
$("#hyperion_global_setting_notify").fadeOut("fast");
$("#dashboard_active_instance").attr("style", "display:none");
}
}
function instanceSwitch(inst)
{
requestInstanceSwitch(inst)
window.currentHyperionInstance = inst;
window.currentHyperionInstanceName = getInstanceNameByIndex(inst);
setStorage('lastSelectedInstance', inst, false)
updateHyperionInstanceListing()
}
function loadContentTo(containerId, fileName)
{
$(containerId).load("/content/"+fileName+".html");

File diff suppressed because it is too large Load Diff