Add css/js class enable_on_pageload.
This commit is contained in:
		
							parent
							
								
									fa8bbf92f9
								
							
						
					
					
						commit
						2eed3ff1c5
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		|  | @ -304,6 +304,17 @@ function init_button_with_confirm() | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | common.init_enable_on_pageload = | ||||||
|  | function init_enable_on_pageload() | ||||||
|  | { | ||||||
|  |     var elements = Array.from(document.getElementsByClassName("enable_on_pageload")); | ||||||
|  |     elements.forEach(function(element) | ||||||
|  |     { | ||||||
|  |         element.disabled = false; | ||||||
|  |         element.classList.remove("enable_on_pageload"); | ||||||
|  |     }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| common.refresh = | common.refresh = | ||||||
| function refresh() | function refresh() | ||||||
| { | { | ||||||
|  | @ -315,5 +326,6 @@ function on_pageload() | ||||||
| { | { | ||||||
|     common.init_atag_merge_params(); |     common.init_atag_merge_params(); | ||||||
|     common.init_button_with_confirm(); |     common.init_button_with_confirm(); | ||||||
|  |     common.init_enable_on_pageload(); | ||||||
| } | } | ||||||
| document.addEventListener("DOMContentLoaded", common.on_pageload); | document.addEventListener("DOMContentLoaded", common.on_pageload); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue