automatically add waves effect to buttons
This commit is contained in:
		
							parent
							
								
									65e8b9686b
								
							
						
					
					
						commit
						0eae6e0368
					
				
					 2 changed files with 21 additions and 3 deletions
				
			
		|  | @ -89,7 +89,6 @@ | |||
|                                     title-for="settings_filters_update" | ||||
|                                     data-enable="filters" | ||||
|                                     data-icon="refresh" | ||||
|                                     class="btn waves-effect" | ||||
|                                 ></button> | ||||
|                                 <button | ||||
|                                     href="settings/filters.htm" | ||||
|  | @ -97,7 +96,6 @@ | |||
|                                     tab-width="1080" | ||||
|                                     data-icon="pencil" | ||||
|                                     title-for="settings_filters_open" | ||||
|                                     class="btn waves-effect" | ||||
|                                 ></button> | ||||
|                             </side> | ||||
|                         </section> | ||||
|  | @ -184,7 +182,7 @@ | |||
|                 href="help" | ||||
|                 tab-height="607.5" | ||||
|                 tab-width="1080" | ||||
|                 class="btn-floating btn-large waves-effect" | ||||
|                 class="btn-floating btn-large" | ||||
|                 title-for="help" | ||||
|                 data-icon="help" | ||||
|             ></button> | ||||
|  |  | |||
|  | @ -78,6 +78,25 @@ class windowman { | |||
| 
 | ||||
| 		/* Fill in data and events.  */ | ||||
| 		function appearance() { | ||||
| 			// Add missing classes to all elements. 
 | ||||
| 			function elements() { | ||||
| 				// Add buttons elements. 
 | ||||
| 				function buttons() { | ||||
| 					document.querySelectorAll(`button`).forEach((button) => { | ||||
| 						if (!button.classList.contains(`btn`)) { | ||||
| 							button.classList.add(`btn`); | ||||
| 						} | ||||
| 						if (!button.classList.contains(`waves-effect`)) { | ||||
| 							button.classList.add(`waves-effect`); | ||||
| 						} | ||||
| 					}) | ||||
| 
 | ||||
| 					 | ||||
| 				} | ||||
| 				buttons(); | ||||
| 			} | ||||
| 
 | ||||
| 
 | ||||
| 			function icons() { | ||||
| 				let target_elements = document.querySelectorAll(`[data-icon]`); | ||||
| 
 | ||||
|  | @ -204,6 +223,7 @@ class windowman { | |||
| 				}); | ||||
| 			} | ||||
| 
 | ||||
| 			elements(); | ||||
| 			text(); | ||||
| 			icons(); | ||||
| 			storage(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue