mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						 Paulchen-Panther
						Paulchen-Panther
					
				
			
			
				
	
			
			
			
						parent
						
							ce2f0a17d5
						
					
				
				
					commit
					1960f7652d
				
			| @@ -70,8 +70,10 @@ | ||||
| 	"dashboard_alert_message_confedit": "Deine Hyperion Konfiguration wurde verändert. Um die Änderungen anzuwenden, starte Hyperion neu.", | ||||
| 	"dashboard_alert_message_disabled_t" : "LED Hardware instanz deaktiviert", | ||||
| 	"dashboard_alert_message_disabled" : "Diese Instanz ist momentan deaktiviert! Um sie zu nutzen, musst du sie zuerst wieder im Dashboard aktivieren.", | ||||
| 	"dashboard_alert_message_confsave_success_t": "Konfiguration gespeichert", | ||||
| 	"dashboard_alert_message_confsave_success": "Deine Hyperion Konfiguration wurde erfolgreich gespeichert. Deine Änderungen sind somit übernommen.", | ||||
| 	"dashboard_alert_message_confsave_success_t" : "Konfiguration gespeichert", | ||||
| 	"dashboard_alert_message_confsave_success" : "Deine Hyperion Konfiguration wurde erfolgreich gespeichert. Deine Änderungen sind somit übernommen.", | ||||
| 	"dashboard_message_global_setting_t": "Instanzunabhängige Einstellung", | ||||
| 	"dashboard_message_global_setting": "Die Einstellungen auf dieser Seite sind instanzunabhängig. Änderungen werden global übernommen.", | ||||
| 	"main_menu_dashboard_token": "Dashboard", | ||||
| 	"main_menu_configuration_token": "Konfiguration", | ||||
| 	"main_menu_general_conf_token": "Allgemein", | ||||
|   | ||||
| @@ -71,6 +71,8 @@ | ||||
| 	"dashboard_alert_message_disabled" : "This instance is currently disabled! To use it again, enable it at the dashboard.", | ||||
| 	"dashboard_alert_message_confsave_success_t" : "Configuration saved", | ||||
| 	"dashboard_alert_message_confsave_success" : "Your Hyperion configuration has been saved successfully. Your changes are now active.", | ||||
| 	"dashboard_message_global_setting_t": "Instance independent setting", | ||||
| 	"dashboard_message_global_setting": "The settings on this page are not depending on a specific instance. Changes will be stored globally for all instances.", | ||||
| 	"main_menu_dashboard_token" : "Dashboard", | ||||
| 	"main_menu_configuration_token" : "Configuration", | ||||
| 	"main_menu_general_conf_token" : "General", | ||||
|   | ||||
| @@ -207,6 +207,12 @@ | ||||
| 				<span data-i18n="dashboard_alert_message_confsave_success"></span> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div id="hyperion_global_setting_notify" style="display:none;padding:0 10px;margin:0"> | ||||
| 			<div class="bs-callout bs-callout-warning"> | ||||
| 				<h4 data-i18n="dashboard_message_global_setting_t"></h4> | ||||
| 				<span data-i18n="dashboard_message_global_setting"></span> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div id="hyperion_disabled_notify" style="display:none;padding:0 10px;margin:0"> | ||||
| 			<div class="bs-callout bs-callout-danger"> | ||||
| 				<h4 data-i18n="dashboard_alert_message_disabled_t"></h4> | ||||
|   | ||||
| @@ -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"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user