refactor
This commit is contained in:
		
							parent
							
								
									d891afbdf4
								
							
						
					
					
						commit
						cf7a722429
					
				
							
								
								
									
										8
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								main.js
									
									
									
									
									
								
							| @ -2015,13 +2015,19 @@ | |||||||
|     `)
 |     `)
 | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function prettifyRouteEditPage() { |   function makeTextareasOneRowInRouteEditPage() { | ||||||
|     document.querySelectorAll(`textarea:is([name="track[comment_int]"], [name="track[comment_ext]"])`).forEach(el => { |     document.querySelectorAll(`textarea:is([name="track[comment_int]"], [name="track[comment_ext]"])`).forEach(el => { | ||||||
|       el.rows = 1 |       el.rows = 1 | ||||||
|     }) |     }) | ||||||
|  |   } | ||||||
|    |    | ||||||
|  |   function hideRedundantRowsInRouteEditPage() { | ||||||
|     document.querySelectorAll(`table tr:is(:nth-child(3), :nth-child(4), :nth-child(5))`).forEach(el => el.classList.add("hidden")) |     document.querySelectorAll(`table tr:is(:nth-child(3), :nth-child(4), :nth-child(5))`).forEach(el => el.classList.add("hidden")) | ||||||
|  |   } | ||||||
| 
 | 
 | ||||||
|  |   function prettifyRouteEditPage() { | ||||||
|  |     makeTextareasOneRowInRouteEditPage() | ||||||
|  |     hideRedundantRowsInRouteEditPage() | ||||||
|     createPointsInpitForRouteEditPage() |     createPointsInpitForRouteEditPage() | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user