mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* Update Gijgo to 1.9.13 * Update DOMPurify 2.3.6 * Update Marked 4.0.12 * Update metismenu 3.0.7 * Issue Update Priority, if first LED changes for COLOR update (to reflect color correctly in UI) * Add Yeelight W3 MultiColor * Update to jquery 3.6.0
		
			
				
	
	
		
			33 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
 $(document).ready( function() {
 | 
						|
	performTranslation();
 | 
						|
 | 
						|
	var conf_editor = null;
 | 
						|
 | 
						|
	$('#conf_cont').append(createOptPanel('fa-wrench', $.i18n("edt_conf_webc_heading_title"), 'editor_container', 'btn_submit', 'panel-system'));
 | 
						|
	if(window.showOptHelp)
 | 
						|
	{
 | 
						|
		$('#conf_cont').append(createHelpTable(window.schema.webConfig.properties, $.i18n("edt_conf_webc_heading_title")));
 | 
						|
	}
 | 
						|
 | 
						|
	conf_editor = createJsonEditor('editor_container', {
 | 
						|
		webConfig : window.schema.webConfig
 | 
						|
	}, true, true);
 | 
						|
 | 
						|
	conf_editor.on('change',function() {
 | 
						|
		conf_editor.validate().length || window.readOnlyMode ? $('#btn_submit').prop('disabled', true) : $('#btn_submit').prop('disabled', false);
 | 
						|
	});
 | 
						|
 | 
						|
	$('#btn_submit').off().on('click',function() {
 | 
						|
		// store the last webui port for correct reconnect url (connection_lost.html)
 | 
						|
		var val = conf_editor.getValue();
 | 
						|
		window.fastReconnect = true;
 | 
						|
		window.jsonPort = val.webConfig.port;
 | 
						|
		requestWriteConfig(val);
 | 
						|
	});
 | 
						|
 | 
						|
	if(window.showOptHelp)
 | 
						|
		createHint("intro", $.i18n('conf_webconfig_label_intro'), "editor_container");
 | 
						|
 | 
						|
	removeOverlay();
 | 
						|
});
 |